home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX 2e document text
| default
| |
99%
| file
| LaTeX document text
| default
| |
98%
| file
| LaTeX document, ASCII text, with CRLF line terminators
| default
| |
100%
| TrID
| LaTeX 2e document (with rem)
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| detectItEasy
| Format: plain text[CRLF]
| default (weak)
| |
100%
| xdgMime
| text/x-matlab
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 25 20 54 68 69 73 20 69 | 73 20 6d 34 20 73 6f 75 |% This i|s m4 sou|
|00000010| 72 63 65 20 63 6f 64 65 | 20 66 6f 72 20 74 68 65 |rce code| for the|
|00000020| 20 64 6f 63 75 6d 65 6e | 74 20 69 6e 20 4c 61 54 | documen|t in LaT|
|00000030| 65 58 20 66 6f 72 6d 61 | 74 2e 20 6d 34 20 69 73 |eX forma|t. m4 is|
|00000040| 20 6a 75 73 74 20 75 73 | 65 64 0d 0a 25 20 66 6f | just us|ed..% fo|
|00000050| 72 20 69 6e 63 6c 75 64 | 69 6e 67 20 73 6f 6d 65 |r includ|ing some|
|00000060| 20 66 69 6c 65 73 20 2d | 20 6c 61 74 65 78 32 68 | files -| latex2h|
|00000070| 74 6d 6c 20 64 6f 65 73 | 6e 27 74 20 70 72 6f 63 |tml does|n't proc|
|00000080| 65 73 73 20 6d 61 63 72 | 6f 73 20 69 6e 20 74 68 |ess macr|os in th|
|00000090| 65 6d 0d 0a 25 20 6f 74 | 68 65 72 77 69 73 65 2e |em..% ot|herwise.|
|000000a0| 20 4e 6f 74 65 20 63 68 | 61 6e 67 65 71 75 6f 74 | Note ch|angequot|
|000000b0| 65 20 62 65 6c 6f 77 2e | 0d 0a 63 68 61 6e 67 65 |e below.|..change|
|000000c0| 71 75 6f 74 65 28 25 62 | 71 2c 25 65 71 29 0d 0a |quote(%b|q,%eq)..|
|000000d0| 25 62 71 0d 0a 5c 64 6f | 63 75 6d 65 6e 74 63 6c |%bq..\do|cumentcl|
|000000e0| 61 73 73 5b 61 34 70 61 | 70 65 72 2c 31 32 70 74 |ass[a4pa|per,12pt|
|000000f0| 2c 6f 6e 65 73 69 64 65 | 5d 7b 62 6f 6f 6b 7d 0d |,oneside|]{book}.|
|00000100| 0a 25 65 71 0d 0a 69 6e | 63 6c 75 64 65 28 6d 69 |.%eq..in|clude(mi|
|00000110| 64 61 73 64 6f 63 2e 73 | 74 79 29 0d 0a 25 62 71 |dasdoc.s|ty)..%bq|
|00000120| 0d 0a 0d 0a 5c 61 75 74 | 68 6f 72 7b 50 65 74 74 |....\aut|hor{Pett|
|00000130| 65 72 69 20 4b 61 6e 67 | 61 73 6c 61 6d 70 69 7d |eri Kang|aslampi}|
|00000140| 0d 0a 5c 74 69 74 6c 65 | 7b 4d 49 44 41 53 20 53 |..\title|{MIDAS S|
|00000150| 6f 75 6e 64 20 53 79 73 | 74 65 6d 5c 5c 20 5c 20 |ound Sys|tem\\ \ |
|00000160| 5c 5c 20 50 72 6f 67 72 | 61 6d 6d 65 72 27 73 20 |\\ Progr|ammer's |
|00000170| 47 75 69 64 65 7d 0d 0a | 0d 0a 0d 0a 5c 62 65 67 |Guide}..|....\beg|
|00000180| 69 6e 7b 64 6f 63 75 6d | 65 6e 74 7d 0d 0a 0d 0a |in{docum|ent}....|
|00000190| 5c 6d 61 6b 65 74 69 74 | 6c 65 0d 0a 5c 70 61 67 |\maketit|le..\pag|
|000001a0| 65 6e 75 6d 62 65 72 69 | 6e 67 7b 72 6f 6d 61 6e |enumberi|ng{roman|
|000001b0| 7d 0d 0a 5c 74 61 62 6c | 65 6f 66 63 6f 6e 74 65 |}..\tabl|eofconte|
|000001c0| 6e 74 73 0d 0a 0d 0a 5c | 6e 65 77 70 61 67 65 0d |nts....\|newpage.|
|000001d0| 0a 5c 70 61 67 65 6e 75 | 6d 62 65 72 69 6e 67 7b |.\pagenu|mbering{|
|000001e0| 61 72 61 62 69 63 7d 0d | 0a 5c 63 68 61 70 74 65 |arabic}.|.\chapte|
|000001f0| 72 7b 49 6e 74 72 6f 64 | 75 63 74 69 6f 6e 7d 0d |r{Introd|uction}.|
|00000200| 0a 0d 0a 5c 73 65 63 74 | 69 6f 6e 7b 57 65 6c 63 |...\sect|ion{Welc|
|00000210| 6f 6d 65 7d 0d 0a 0d 0a | 57 65 6c 63 6f 6d 65 20 |ome}....|Welcome |
|00000220| 74 6f 20 74 68 65 20 65 | 78 63 69 74 69 6e 67 20 |to the e|xciting |
|00000230| 77 6f 72 6c 64 20 6f 66 | 20 64 69 67 69 74 61 6c |world of| digital|
|00000240| 20 61 75 64 69 6f 21 20 | 4d 49 44 41 53 20 53 6f | audio! |MIDAS So|
|00000250| 75 6e 64 20 53 79 73 74 | 65 6d 20 69 73 20 74 68 |und Syst|em is th|
|00000260| 65 0d 0a 6d 6f 73 74 20 | 63 6f 6d 70 72 65 68 65 |e..most |comprehe|
|00000270| 6e 73 69 76 65 20 63 72 | 6f 73 73 2d 70 6c 61 74 |nsive cr|oss-plat|
|00000280| 66 6f 72 6d 20 64 69 67 | 69 74 61 6c 20 61 75 64 |form dig|ital aud|
|00000290| 69 6f 20 73 79 73 74 65 | 6d 20 74 6f 64 61 79 2e |io syste|m today.|
|000002a0| 20 57 69 74 68 20 66 65 | 61 74 75 72 65 73 0d 0a | With fe|atures..|
|000002b0| 73 75 63 68 20 61 73 20 | 61 6e 20 75 6e 6c 69 6d |such as |an unlim|
|000002c0| 69 74 65 64 20 6e 75 6d | 62 65 72 20 6f 66 20 64 |ited num|ber of d|
|000002d0| 69 67 69 74 61 6c 20 63 | 68 61 6e 6e 65 6c 73 20 |igital c|hannels |
|000002e0| 6f 6e 20 61 6c 6c 20 73 | 75 70 70 6f 72 74 65 64 |on all s|upported|
|000002f0| 20 70 6c 61 74 66 6f 72 | 6d 73 2c 0d 0a 73 69 6d | platfor|ms,..sim|
|00000300| 75 6c 74 61 6e 65 6f 75 | 73 20 73 61 6d 70 6c 65 |ultaneou|s sample|
|00000310| 2c 20 6d 6f 64 75 6c 65 | 20 61 6e 64 20 73 74 72 |, module| and str|
|00000320| 65 61 6d 20 70 6c 61 79 | 62 61 63 6b 2c 20 61 6e |eam play|back, an|
|00000330| 64 20 73 65 61 6d 6c 65 | 73 73 20 70 6f 72 74 61 |d seamle|ss porta|
|00000340| 62 69 6c 69 74 79 0d 0a | 61 63 72 6f 73 73 20 6f |bility..|across o|
|00000350| 70 65 72 61 74 69 6e 67 | 20 73 79 73 74 65 6d 73 |perating| systems|
|00000360| 2c 20 4d 49 44 41 53 20 | 69 73 20 61 6c 6c 20 79 |, MIDAS |is all y|
|00000370| 6f 75 20 6e 65 65 64 20 | 66 6f 72 20 70 65 72 66 |ou need |for perf|
|00000380| 65 63 74 20 73 6f 75 6e | 64 20 69 6e 20 79 6f 75 |ect soun|d in you|
|00000390| 72 0d 0a 61 70 70 6c 69 | 63 61 74 69 6f 6e 2e 0d |r..appli|cation..|
|000003a0| 0a 0d 0a 54 68 69 73 20 | 6d 61 6e 75 61 6c 20 69 |...This |manual i|
|000003b0| 73 20 74 68 65 20 50 72 | 6f 67 72 61 6d 6d 65 72 |s the Pr|ogrammer|
|000003c0| 27 73 20 47 75 69 64 65 | 20 74 6f 20 74 68 65 20 |'s Guide| to the |
|000003d0| 4d 49 44 41 53 20 53 6f | 75 6e 64 20 53 79 73 74 |MIDAS So|und Syst|
|000003e0| 65 6d 2e 20 49 74 20 69 | 6e 63 6c 75 64 65 73 0d |em. It i|ncludes.|
|000003f0| 0a 64 65 73 63 72 69 70 | 74 69 6f 6e 73 20 61 62 |.descrip|tions ab|
|00000400| 6f 75 74 20 61 6c 6c 20 | 61 73 70 65 63 74 73 20 |out all |aspects |
|00000410| 6f 66 20 4d 49 44 41 53 | 2c 20 69 6e 63 6c 75 64 |of MIDAS|, includ|
|00000420| 69 6e 67 20 69 6e 69 74 | 69 61 6c 69 7a 61 74 69 |ing init|ializati|
|00000430| 6f 6e 2c 0d 0a 63 6f 6e | 66 69 67 75 72 61 74 69 |on,..con|figurati|
|00000440| 6f 6e 20 61 6e 64 20 75 | 73 61 67 65 20 6f 66 20 |on and u|sage of |
|00000450| 64 69 66 66 65 72 65 6e | 74 20 73 79 73 74 65 6d |differen|t system|
|00000460| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 2e 20 49 74 20 | compone|nts. It |
|00000470| 64 6f 65 73 20 6e 6f 74 | 20 61 74 74 65 6d 70 74 |does not| attempt|
|00000480| 0d 0a 74 6f 20 64 6f 63 | 75 6d 65 6e 74 20 61 6c |..to doc|ument al|
|00000490| 6c 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 6e 64 20 |l functi|ons and |
|000004a0| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 73 20 |data str|uctures |
|000004b0| 61 76 61 69 6c 61 62 6c | 65 20 69 6e 20 4d 49 44 |availabl|e in MID|
|000004c0| 41 53 2c 20 62 75 74 0d | 0a 72 61 74 68 65 72 20 |AS, but.|.rather |
|000004d0| 67 69 76 65 20 61 20 67 | 6f 6f 64 20 6f 76 65 72 |give a g|ood over|
|000004e0| 76 69 65 77 20 6f 6e 20 | 68 6f 77 20 79 6f 75 20 |view on |how you |
|000004f0| 63 61 6e 20 75 73 65 20 | 4d 49 44 41 53 20 69 6e |can use |MIDAS in|
|00000500| 20 79 6f 75 72 20 6f 77 | 6e 0d 0a 70 72 6f 67 72 | your ow|n..progr|
|00000510| 61 6d 73 2e 20 46 6f 72 | 20 63 6f 6d 70 6c 65 74 |ams. For| complet|
|00000520| 65 20 64 65 73 63 72 69 | 70 74 69 6f 6e 73 20 6f |e descri|ptions o|
|00000530| 66 20 61 6c 6c 20 66 75 | 6e 63 74 69 6f 6e 20 61 |f all fu|nction a|
|00000540| 6e 64 20 64 61 74 61 20 | 73 74 72 75 63 74 75 72 |nd data |structur|
|00000550| 65 73 2c 20 73 65 65 0d | 0a 5c 68 74 6d 6c 61 64 |es, see.|.\htmlad|
|00000560| 64 6e 6f 72 6d 61 6c 6c | 69 6e 6b 7b 4d 49 44 41 |dnormall|ink{MIDA|
|00000570| 53 20 41 50 49 20 52 65 | 66 65 72 65 6e 63 65 7d |S API Re|ference}|
|00000580| 7b 2e 2e 2f 61 70 69 72 | 65 66 2f 61 70 69 72 65 |{../apir|ef/apire|
|00000590| 66 2e 68 74 6d 6c 7d 0d | 0a 0d 0a 0d 0a 5c 73 65 |f.html}.|.....\se|
|000005a0| 63 74 69 6f 6e 7b 57 68 | 61 74 20 69 73 20 4d 49 |ction{Wh|at is MI|
|000005b0| 44 41 53 3f 7d 0d 0a 0d | 0a 57 68 61 74 20 69 73 |DAS?}...|.What is|
|000005c0| 20 4d 49 44 41 53 20 53 | 6f 75 6e 64 20 53 79 73 | MIDAS S|ound Sys|
|000005d0| 74 65 6d 20 61 6e 79 77 | 61 79 3f 0d 0a 0d 0a 4d |tem anyw|ay?....M|
|000005e0| 49 44 41 53 20 69 73 20 | 61 20 6d 75 6c 74 69 63 |IDAS is |a multic|
|000005f0| 68 61 6e 6e 65 6c 20 64 | 69 67 69 74 61 6c 20 6d |hannel d|igital m|
|00000600| 75 73 69 63 20 61 6e 64 | 20 73 6f 75 6e 64 20 65 |usic and| sound e|
|00000610| 6e 67 69 6e 65 2e 20 49 | 74 20 70 72 6f 76 69 64 |ngine. I|t provid|
|00000620| 65 73 20 79 6f 75 20 77 | 69 74 68 0d 0a 61 6e 20 |es you w|ith..an |
|00000630| 75 6e 6c 69 6d 69 74 65 | 64 20 6e 75 6d 62 65 72 |unlimite|d number|
|00000640| 20 6f 66 20 63 68 61 6e | 6e 65 6c 73 20 6f 66 20 | of chan|nels of |
|00000650| 64 69 67 69 74 61 6c 20 | 61 75 64 69 6f 20 74 68 |digital |audio th|
|00000660| 61 74 20 79 6f 75 20 63 | 61 6e 20 75 73 65 20 74 |at you c|an use t|
|00000670| 6f 20 70 6c 61 79 0d 0a | 6d 75 73 69 63 2c 20 73 |o play..|music, s|
|00000680| 6f 75 6e 64 20 65 66 66 | 65 63 74 73 2c 20 73 70 |ound eff|ects, sp|
|00000690| 65 65 63 68 20 6f 72 20 | 73 6f 75 6e 64 20 73 74 |eech or |sound st|
|000006a0| 72 65 61 6d 73 2e 20 4d | 49 44 41 53 20 69 73 20 |reams. M|IDAS is |
|000006b0| 70 6f 72 74 61 62 6c 65 | 20 61 63 72 6f 73 73 20 |portable| across |
|000006c0| 61 0d 0a 77 69 64 65 20 | 72 61 6e 67 65 20 6f 66 |a..wide |range of|
|000006d0| 20 6f 70 65 72 61 74 69 | 6e 67 20 73 79 73 74 65 | operati|ng syste|
|000006e0| 6d 73 2c 20 61 6e 64 20 | 70 72 6f 76 69 64 65 73 |ms, and |provides|
|000006f0| 20 61 6e 20 69 64 65 6e | 74 69 63 61 6c 20 41 50 | an iden|tical AP|
|00000700| 49 20 69 6e 20 61 6c 6c | 0d 0a 73 75 70 70 6f 72 |I in all|..suppor|
|00000710| 74 65 64 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 73 |ted envi|ronments|
|00000720| 2c 20 6d 61 6b 69 6e 67 | 20 69 74 20 69 64 65 61 |, making| it idea|
|00000730| 6c 20 66 6f 72 20 63 72 | 6f 73 73 2d 70 6c 61 74 |l for cr|oss-plat|
|00000740| 66 6f 72 6d 20 73 6f 66 | 74 77 61 72 65 0d 0a 64 |form sof|tware..d|
|00000750| 65 76 65 6c 6f 70 6d 65 | 6e 74 2e 0d 0a 0d 0a 4d |evelopme|nt.....M|
|00000760| 49 44 41 53 20 69 73 20 | 66 72 65 65 20 66 6f 72 |IDAS is |free for|
|00000770| 20 6e 6f 6e 63 6f 6d 6d | 65 72 63 69 61 6c 20 75 | noncomm|ercial u|
|00000780| 73 61 67 65 2c 20 72 65 | 61 64 20 74 68 65 20 66 |sage, re|ad the f|
|00000790| 69 6c 65 0d 0a 5c 6d 46 | 69 6c 65 4e 61 6d 65 7b |ile..\mF|ileName{|
|000007a0| 6c 69 63 65 6e 73 65 2e | 74 78 74 7d 20 69 6e 63 |license.|txt} inc|
|000007b0| 6c 75 64 65 64 20 69 6e | 20 74 68 65 20 4d 49 44 |luded in| the MID|
|000007c0| 41 53 20 64 69 73 74 72 | 69 62 75 74 69 6f 6e 20 |AS distr|ibution |
|000007d0| 66 6f 72 20 61 20 64 65 | 74 61 69 6c 65 64 0d 0a |for a de|tailed..|
|000007e0| 6c 69 63 65 6e 73 65 2e | 20 43 6f 6d 6d 65 72 63 |license.| Commerc|
|000007f0| 69 61 6c 20 6c 69 63 65 | 6e 73 65 73 20 61 72 65 |ial lice|nses are|
|00000800| 20 61 6c 73 6f 20 61 76 | 61 69 6c 61 62 6c 65 2e | also av|ailable.|
|00000810| 0d 0a 0d 0a 0d 0a 0d 0a | 5c 63 68 61 70 74 65 72 |........|\chapter|
|00000820| 7b 47 65 74 74 69 6e 67 | 20 73 74 61 72 74 65 64 |{Getting| started|
|00000830| 7d 0d 0a 0d 0a 41 6c 74 | 68 6f 75 67 68 20 4d 49 |}....Alt|hough MI|
|00000840| 44 41 53 20 69 73 20 61 | 20 76 65 72 79 20 70 6f |DAS is a| very po|
|00000850| 77 65 72 66 75 6c 20 73 | 6f 75 6e 64 20 65 6e 67 |werful s|ound eng|
|00000860| 69 6e 65 2c 20 69 74 20 | 69 73 20 61 6c 73 6f 20 |ine, it |is also |
|00000870| 65 78 74 72 65 6d 65 6c | 79 0d 0a 65 61 73 79 20 |extremel|y..easy |
|00000880| 74 6f 20 75 73 65 2e 20 | 54 68 69 73 20 63 68 61 |to use. |This cha|
|00000890| 70 74 65 72 20 63 6f 6e | 74 61 69 6e 73 20 61 6c |pter con|tains al|
|000008a0| 6c 20 74 68 65 20 69 6e | 66 6f 72 6d 61 74 69 6f |l the in|formatio|
|000008b0| 6e 20 6e 65 63 65 73 73 | 61 72 79 20 74 6f 20 64 |n necess|ary to d|
|000008c0| 65 76 65 6c 6f 70 0d 0a | 73 69 6d 70 6c 65 20 73 |evelop..|simple s|
|000008d0| 6f 75 6e 64 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |ound app|lication|
|000008e0| 73 20 75 73 69 6e 67 20 | 4d 49 44 41 53 2e 20 49 |s using |MIDAS. I|
|000008f0| 74 20 64 65 73 63 72 69 | 62 65 73 20 68 6f 77 20 |t descri|bes how |
|00000900| 74 6f 20 6c 69 6e 6b 20 | 4d 49 44 41 53 20 69 6e |to link |MIDAS in|
|00000910| 74 6f 0d 0a 79 6f 75 72 | 20 6f 77 6e 20 70 72 6f |to..your| own pro|
|00000920| 67 72 61 6d 73 2c 20 68 | 6f 77 20 74 6f 20 75 73 |grams, h|ow to us|
|00000930| 65 20 74 68 65 20 4d 49 | 44 41 53 20 41 50 49 20 |e the MI|DAS API |
|00000940| 66 75 6e 63 74 69 6f 6e | 73 20 66 72 6f 6d 20 79 |function|s from y|
|00000950| 6f 75 72 20 6f 77 6e 20 | 63 6f 64 65 2c 20 61 6e |our own |code, an|
|00000960| 64 0d 0a 63 6f 6e 63 6c | 75 64 65 73 20 77 69 74 |d..concl|udes wit|
|00000970| 68 20 61 20 73 69 6d 70 | 6c 65 20 6d 6f 64 75 6c |h a simp|le modul|
|00000980| 65 20 70 6c 61 79 65 72 | 20 70 72 6f 67 72 61 6d |e player| program|
|00000990| 20 65 78 61 6d 70 6c 65 | 2e 0d 0a 0d 0a 0d 0a 5c | example|.......\|
|000009a0| 73 65 63 74 69 6f 6e 7b | 43 6f 6d 70 69 6c 69 6e |section{|Compilin|
|000009b0| 67 20 77 69 74 68 20 4d | 49 44 41 53 7d 0d 0a 0d |g with M|IDAS}...|
|000009c0| 0a 46 6f 72 20 61 70 70 | 6c 69 63 61 74 69 6f 6e |.For app|lication|
|000009d0| 73 20 75 73 69 6e 67 20 | 6a 75 73 74 20 74 68 65 |s using |just the|
|000009e0| 20 4d 49 44 41 53 20 41 | 50 49 2c 20 6e 6f 20 73 | MIDAS A|PI, no s|
|000009f0| 70 65 63 69 61 6c 20 63 | 6f 6d 70 69 6c 61 74 69 |pecial c|ompilati|
|00000a00| 6f 6e 20 6f 70 74 69 6f | 6e 73 20 61 72 65 0d 0a |on optio|ns are..|
|00000a10| 6e 65 63 65 73 73 61 72 | 79 2e 20 41 6c 6c 20 4d |necessar|y. All M|
|00000a20| 49 44 41 53 20 41 50 49 | 20 64 65 66 69 6e 69 74 |IDAS API| definit|
|00000a30| 69 6f 6e 73 20 61 72 65 | 20 69 6e 20 74 68 65 20 |ions are| in the |
|00000a40| 66 69 6c 65 20 5c 6d 46 | 69 6c 65 4e 61 6d 65 7b |file \mF|ileName{|
|00000a50| 6d 69 64 61 73 64 6c 6c | 2e 68 7d 0d 0a 5b 46 49 |midasdll|.h}..[FI|
|00000a60| 58 4d 45 5d 2c 20 61 6e | 64 20 74 68 65 20 6d 6f |XME], an|d the mo|
|00000a70| 64 75 6c 65 73 20 75 73 | 69 6e 67 20 4d 49 44 41 |dules us|ing MIDA|
|00000a80| 53 20 66 75 6e 63 74 69 | 6f 6e 73 20 73 69 6d 70 |S functi|ons simp|
|00000a90| 6c 79 20 6e 65 65 64 20 | 74 6f 0d 0a 5c 6d 52 65 |ly need |to..\mRe|
|00000aa0| 73 57 6f 72 64 7b 5c 23 | 7b 7d 69 6e 63 6c 75 64 |sWord{\#|{}includ|
|00000ab0| 65 7d 20 74 68 69 73 20 | 66 69 6c 65 2e 20 4e 6f |e} this |file. No|
|00000ac0| 20 73 70 65 63 69 61 6c | 20 6d 61 63 72 6f 73 20 | special| macros |
|00000ad0| 6e 65 65 64 20 74 6f 20 | 62 65 0d 0a 5c 6d 52 65 |need to |be..\mRe|
|00000ae0| 73 57 6f 72 64 7b 5c 23 | 7b 7d 64 65 66 69 6e 65 |sWord{\#|{}define|
|00000af0| 7d 64 2c 20 61 6e 64 20 | 74 68 65 20 64 61 74 61 |}d, and |the data|
|00000b00| 20 73 74 72 75 63 74 75 | 72 65 73 20 61 72 65 20 | structu|res are |
|00000b10| 73 74 72 75 63 74 75 72 | 65 2d 70 61 63 6b 69 6e |structur|e-packin|
|00000b20| 67 20 6e 65 75 74 72 61 | 6c 2e 0d 0a 5c 6d 46 69 |g neutra|l...\mFi|
|00000b30| 6c 65 4e 61 6d 65 7b 6d | 69 64 61 73 64 6c 6c 2e |leName{m|idasdll.|
|00000b40| 68 7d 20 69 73 20 6c 6f | 63 61 74 65 64 20 69 6e |h} is lo|cated in|
|00000b50| 20 74 68 65 20 5c 6d 46 | 69 6c 65 4e 61 6d 65 7b | the \mF|ileName{|
|00000b60| 69 6e 63 6c 75 64 65 2f | 7d 20 73 75 62 64 69 72 |include/|} subdir|
|00000b70| 65 63 74 6f 72 79 20 6f | 66 0d 0a 74 68 65 20 4d |ectory o|f..the M|
|00000b80| 49 44 41 53 20 64 69 73 | 74 72 69 62 75 74 69 6f |IDAS dis|tributio|
|00000b90| 6e 2c 20 61 6e 64 20 79 | 6f 75 20 6d 61 79 20 6e |n, and y|ou may n|
|00000ba0| 65 65 64 20 74 6f 20 61 | 64 64 20 74 68 61 74 20 |eed to a|dd that |
|00000bb0| 64 69 72 65 63 74 6f 72 | 79 20 74 6f 20 79 6f 75 |director|y to you|
|00000bc0| 72 0d 0a 69 6e 63 6c 75 | 64 65 20 66 69 6c 65 20 |r..inclu|de file |
|00000bd0| 73 65 61 72 63 68 20 70 | 61 74 68 2e 0d 0a 0d 0a |search p|ath.....|
|00000be0| 55 6e 64 65 72 20 57 69 | 6e 64 6f 77 73 20 4e 54 |Under Wi|ndows NT|
|00000bf0| 2f 39 35 2c 20 74 68 65 | 20 4d 49 44 41 53 20 41 |/95, the| MIDAS A|
|00000c00| 50 49 20 66 75 6e 63 74 | 69 6f 6e 73 20 75 73 65 |PI funct|ions use|
|00000c10| 20 74 68 65 20 5c 6d 52 | 65 73 57 6f 72 64 7b 73 | the \mR|esWord{s|
|00000c20| 74 64 63 61 6c 6c 7d 0d | 0a 63 61 6c 6c 69 6e 67 |tdcall}.|.calling|
|00000c30| 20 63 6f 6e 76 65 6e 74 | 69 6f 6e 2c 20 74 68 65 | convent|ion, the|
|00000c40| 20 73 61 6d 65 20 61 73 | 20 75 73 65 64 20 62 79 | same as| used by|
|00000c50| 20 74 68 65 20 57 69 6e | 33 32 20 41 50 49 2e 20 | the Win|32 API. |
|00000c60| 55 6e 64 65 72 20 44 4f | 53 2c 20 74 68 65 0d 0a |Under DO|S, the..|
|00000c70| 66 75 6e 63 74 69 6f 6e | 73 20 75 73 65 20 74 68 |function|s use th|
|00000c80| 65 20 5c 6d 52 65 73 57 | 6f 72 64 7b 63 64 65 63 |e \mResW|ord{cdec|
|00000c90| 6c 7d 20 63 61 6c 6c 69 | 6e 67 20 63 6f 6e 76 65 |l} calli|ng conve|
|00000ca0| 6e 74 69 6f 6e 2c 20 61 | 6e 64 20 75 6e 64 65 72 |ntion, a|nd under|
|00000cb0| 20 4c 69 6e 75 78 20 74 | 68 65 0d 0a 64 65 66 61 | Linux t|he..defa|
|00000cc0| 75 6c 74 20 63 61 6c 6c | 69 6e 67 20 63 6f 6e 76 |ult call|ing conv|
|00000cd0| 65 6e 74 69 6f 6e 20 75 | 73 65 64 20 62 79 20 47 |ention u|sed by G|
|00000ce0| 43 43 2e 20 54 68 69 73 | 20 69 73 20 64 6f 6e 65 |CC. This| is done|
|00000cf0| 20 74 72 61 6e 73 70 61 | 72 65 6e 74 6c 79 20 74 | transpa|rently t|
|00000d00| 6f 20 74 68 65 0d 0a 75 | 73 65 72 2c 20 68 6f 77 |o the..u|ser, how|
|00000d10| 65 76 65 72 2e 0d 0a 0d | 0a 44 65 6c 70 68 69 20 |ever....|.Delphi |
|00000d20| 75 73 65 72 73 20 63 61 | 6e 20 73 69 6d 70 6c 79 |users ca|n simply|
|00000d30| 20 75 73 65 20 74 68 65 | 20 69 6e 74 65 72 66 61 | use the| interfa|
|00000d40| 63 65 20 75 6e 69 74 20 | 5c 6d 46 69 6c 65 4e 61 |ce unit |\mFileNa|
|00000d50| 6d 65 7b 6d 69 64 61 73 | 64 6c 6c 2e 70 61 73 7d |me{midas|dll.pas}|
|00000d60| 2c 20 61 6e 64 0d 0a 61 | 63 63 65 73 73 20 74 68 |, and..a|ccess th|
|00000d70| 65 20 4d 49 44 41 53 20 | 41 50 49 20 66 75 6e 63 |e MIDAS |API func|
|00000d80| 74 69 6f 6e 73 20 74 68 | 72 6f 75 67 68 20 69 74 |tions th|rough it|
|00000d90| 2e 20 41 6c 74 68 6f 75 | 67 68 20 44 65 6c 70 68 |. Althou|gh Delph|
|00000da0| 69 20 73 79 6e 74 61 78 | 20 69 73 0d 0a 64 69 66 |i syntax| is..dif|
|00000db0| 66 65 72 65 6e 74 20 66 | 72 6f 6d 20 43 2c 20 74 |ferent f|rom C, t|
|00000dc0| 68 65 20 66 75 6e 63 74 | 69 6f 6e 2c 20 73 74 72 |he funct|ion, str|
|00000dd0| 75 63 74 75 72 65 20 61 | 6e 64 20 63 6f 6e 73 74 |ucture a|nd const|
|00000de0| 61 6e 74 20 6e 61 6d 65 | 73 20 61 72 65 20 65 78 |ant name|s are ex|
|00000df0| 61 63 74 6c 79 20 74 68 | 65 0d 0a 73 61 6d 65 2c |actly th|e..same,|
|00000e00| 20 61 6e 64 20 61 6c 6c | 20 70 61 72 61 6d 65 74 | and all| paramet|
|00000e10| 65 72 73 20 61 72 65 20 | 70 61 73 73 65 64 20 6a |ers are |passed j|
|00000e20| 75 73 74 20 6c 69 6b 65 | 20 69 6e 20 74 68 65 20 |ust like| in the |
|00000e30| 43 20 76 65 72 73 69 6f | 6e 73 2e 20 54 68 65 72 |C versio|ns. Ther|
|00000e40| 65 66 6f 72 65 0d 0a 61 | 6c 6c 20 69 6e 66 6f 72 |efore..a|ll infor|
|00000e50| 6d 61 74 69 6f 6e 20 69 | 6e 20 74 68 69 73 20 64 |mation i|n this d|
|00000e60| 6f 63 75 6d 65 6e 74 20 | 61 6e 64 20 74 68 65 20 |ocument |and the |
|00000e70| 41 50 49 20 52 65 66 65 | 72 65 6e 63 65 20 69 73 |API Refe|rence is|
|00000e80| 20 61 6c 73 6f 20 76 61 | 6c 69 64 20 66 6f 72 0d | also va|lid for.|
|00000e90| 0a 44 65 6c 70 68 69 2e | 0d 0a 0d 0a 0d 0a 0d 0a |.Delphi.|........|
|00000ea0| 5c 73 65 63 74 69 6f 6e | 7b 4c 69 6e 6b 69 6e 67 |\section|{Linking|
|00000eb0| 20 77 69 74 68 20 4d 49 | 44 41 53 7d 0d 0a 0d 0a | with MI|DAS}....|
|00000ec0| 49 66 20 79 6f 75 72 20 | 70 72 6f 67 72 61 6d 20 |If your |program |
|00000ed0| 75 73 65 73 20 4d 49 44 | 41 53 20 53 6f 75 6e 64 |uses MID|AS Sound|
|00000ee0| 20 53 79 73 74 65 6d 2c | 20 79 6f 75 20 6e 61 74 | System,| you nat|
|00000ef0| 75 72 61 6c 6c 79 20 6e | 65 65 64 20 74 6f 20 6c |urally n|eed to l|
|00000f00| 69 6e 6b 20 77 69 74 68 | 20 74 68 65 0d 0a 4d 49 |ink with| the..MI|
|00000f10| 44 41 53 20 6c 69 62 72 | 61 72 69 65 73 20 61 73 |DAS libr|aries as|
|00000f20| 20 77 65 6c 6c 2e 20 54 | 68 69 73 20 73 65 63 74 | well. T|his sect|
|00000f30| 69 6f 6e 20 64 65 73 63 | 72 69 62 65 73 20 68 6f |ion desc|ribes ho|
|00000f40| 77 20 74 6f 20 64 6f 20 | 74 68 61 74 20 6f 6e 20 |w to do |that on |
|00000f50| 65 61 63 68 0d 0a 70 6c | 61 74 66 6f 72 6d 20 73 |each..pl|atform s|
|00000f60| 75 70 70 6f 72 74 65 64 | 2e 0d 0a 0d 0a 0d 0a 5c |upported|.......\|
|00000f70| 73 75 62 73 65 63 74 69 | 6f 6e 7b 57 69 6e 64 6f |subsecti|on{Windo|
|00000f80| 77 73 20 4e 54 2f 39 35 | 7d 0d 0a 0d 0a 55 6e 64 |ws NT/95|}....Und|
|00000f90| 65 72 20 74 68 65 20 57 | 69 6e 33 32 20 70 6c 61 |er the W|in32 pla|
|00000fa0| 74 66 6f 72 6d 2c 20 61 | 70 70 6c 69 63 61 74 69 |tform, a|pplicati|
|00000fb0| 6f 6e 73 20 63 61 6e 20 | 6c 69 6e 6b 20 77 69 74 |ons can |link wit|
|00000fc0| 68 20 4d 49 44 41 53 20 | 65 69 74 68 65 72 20 73 |h MIDAS |either s|
|00000fd0| 74 61 74 69 63 61 6c 6c | 79 0d 0a 6f 72 20 64 79 |taticall|y..or dy|
|00000fe0| 6e 61 6d 69 63 61 6c 6c | 79 2e 20 55 6e 6c 65 73 |namicall|y. Unles|
|00000ff0| 73 20 74 68 65 72 65 20 | 69 73 20 61 20 73 70 65 |s there |is a spe|
|00001000| 63 69 66 69 63 20 6e 65 | 65 64 20 74 6f 20 6c 69 |cific ne|ed to li|
|00001010| 6e 6b 20 77 69 74 68 20 | 4d 49 44 41 53 0d 0a 73 |nk with |MIDAS..s|
|00001020| 74 61 74 69 63 61 6c 6c | 79 2c 20 64 79 6e 61 6d |taticall|y, dynam|
|00001030| 69 63 20 6c 69 6e 6b 69 | 6e 67 20 69 73 20 72 65 |ic linki|ng is re|
|00001040| 63 6f 6d 6d 65 6e 64 65 | 64 2e 20 44 65 6c 70 68 |commende|d. Delph|
|00001050| 69 20 75 73 65 72 73 20 | 6e 65 65 64 20 74 6f 20 |i users |need to |
|00001060| 75 73 65 20 64 79 6e 61 | 6d 69 63 0d 0a 6c 69 6e |use dyna|mic..lin|
|00001070| 6b 69 6e 67 20 61 6c 77 | 61 79 73 2e 0d 0a 0d 0a |king alw|ays.....|
|00001080| 57 68 65 6e 20 6c 69 6e | 6b 69 6e 67 20 77 69 74 |When lin|king wit|
|00001090| 68 20 4d 49 44 41 53 20 | 73 74 61 74 69 63 61 6c |h MIDAS |statical|
|000010a0| 6c 79 2c 20 73 69 6d 70 | 6c 79 20 6c 69 6e 6b 20 |ly, simp|ly link |
|000010b0| 69 6e 20 74 68 65 20 6c | 69 62 72 61 72 79 20 66 |in the l|ibrary f|
|000010c0| 69 6c 65 0d 0a 63 6f 72 | 72 65 73 70 6f 6e 64 69 |ile..cor|respondi|
|000010d0| 6e 67 20 74 6f 20 79 6f | 75 72 20 64 65 76 65 6c |ng to yo|ur devel|
|000010e0| 6f 70 6d 65 6e 74 20 70 | 6c 61 74 66 6f 72 6d 2e |opment p|latform.|
|000010f0| 20 41 6c 6c 20 4d 49 44 | 41 53 20 6c 69 62 72 61 | All MID|AS libra|
|00001100| 72 69 65 73 20 61 72 65 | 20 6c 6f 63 61 74 65 64 |ries are| located|
|00001110| 0d 0a 69 6e 20 74 68 65 | 20 5c 6d 46 69 6c 65 4e |..in the| \mFileN|
|00001120| 61 6d 65 7b 6c 69 62 2f | 7d 20 73 75 62 64 69 72 |ame{lib/|} subdir|
|00001130| 65 63 74 6f 72 79 20 6f | 66 20 74 68 65 20 64 69 |ectory o|f the di|
|00001140| 73 74 72 69 62 75 74 69 | 6f 6e 2e 20 57 61 74 63 |stributi|on. Watc|
|00001150| 6f 6d 20 43 2f 43 2b 2b | 20 75 73 65 72 73 0d 0a |om C/C++| users..|
|00001160| 6e 65 65 64 20 74 6f 20 | 6c 69 6e 6b 20 77 69 74 |need to |link wit|
|00001170| 68 20 74 68 65 20 66 69 | 6c 65 20 5c 6d 46 69 6c |h the fi|le \mFil|
|00001180| 65 4e 61 6d 65 7b 6d 69 | 64 61 73 6e 74 5c 5f 7b |eName{mi|dasnt\_{|
|00001190| 7d 77 61 74 63 6f 6d 2e | 6c 69 62 7d 2c 20 61 6e |}watcom.|lib}, an|
|000011a0| 64 20 56 69 73 75 61 6c | 0d 0a 43 2f 43 2b 2b 20 |d Visual|..C/C++ |
|000011b0| 75 73 65 72 73 20 77 69 | 74 68 20 5c 6d 46 69 6c |users wi|th \mFil|
|000011c0| 65 4e 61 6d 65 7b 6d 69 | 64 61 73 6e 74 5c 5f 7b |eName{mi|dasnt\_{|
|000011d0| 7d 76 69 73 75 61 6c 63 | 2e 6c 69 62 7d 2e 20 44 |}visualc|.lib}. D|
|000011e0| 65 70 65 6e 64 69 6e 67 | 20 6f 6e 20 79 6f 75 72 |epending| on your|
|000011f0| 0d 0a 63 6f 6e 66 69 67 | 75 72 61 74 69 6f 6e 2c |..config|uration,|
|00001200| 20 79 6f 75 20 6d 61 79 | 20 6e 65 65 64 20 74 6f | you may| need to|
|00001210| 20 61 64 64 20 74 68 65 | 20 5c 6d 46 69 6c 65 4e | add the| \mFileN|
|00001220| 61 6d 65 7b 6c 69 62 2f | 7d 20 73 75 62 64 69 72 |ame{lib/|} subdir|
|00001230| 65 63 74 6f 72 79 20 69 | 6e 74 6f 0d 0a 79 6f 75 |ectory i|nto..you|
|00001240| 72 20 60 60 6c 69 62 72 | 61 72 79 20 70 61 74 68 |r ``libr|ary path|
|00001250| 73 27 27 20 6c 69 73 74 | 2e 20 57 68 65 6e 20 4d |s'' list|. When M|
|00001260| 49 44 41 53 20 69 73 20 | 6c 69 6e 6b 65 64 20 69 |IDAS is |linked i|
|00001270| 6e 74 6f 20 74 68 65 20 | 61 70 70 6c 69 63 61 74 |nto the |applicat|
|00001280| 69 6f 6e 0d 0a 73 74 61 | 74 69 63 61 6c 6c 79 2c |ion..sta|tically,|
|00001290| 20 74 68 65 20 2e 65 78 | 65 20 69 73 20 73 65 6c | the .ex|e is sel|
|000012a0| 66 2d 63 6f 6e 74 61 69 | 6e 65 64 20 61 6e 64 20 |f-contai|ned and |
|000012b0| 6e 6f 20 4d 49 44 41 53 | 20 5c 6d 46 69 6c 65 4e |no MIDAS| \mFileN|
|000012c0| 61 6d 65 7b 2e 64 6c 6c | 7d 20 66 69 6c 65 73 0d |ame{.dll|} files.|
|000012d0| 0a 61 72 65 20 6e 65 65 | 64 65 64 2e 0d 0a 0d 0a |.are nee|ded.....|
|000012e0| 44 79 6e 61 6d 69 63 20 | 6c 69 6e 6b 69 6e 67 20 |Dynamic |linking |
|000012f0| 69 73 20 64 6f 6e 65 20 | 62 79 20 6c 69 6e 6b 69 |is done |by linki|
|00001300| 6e 67 20 77 69 74 68 20 | 74 68 65 20 61 70 70 72 |ng with |the appr|
|00001310| 6f 70 72 69 61 74 65 20 | 4d 49 44 41 53 20 69 6d |opriate |MIDAS im|
|00001320| 70 6f 72 74 20 6c 69 62 | 72 61 72 79 0d 0a 69 6e |port lib|rary..in|
|00001330| 73 74 65 61 64 20 6f 66 | 20 74 68 65 20 73 74 61 |stead of| the sta|
|00001340| 74 69 63 20 6c 69 6e 6b | 69 6e 67 20 6c 69 62 72 |tic link|ing libr|
|00001350| 61 72 79 2e 20 49 6e 20 | 61 64 64 69 74 69 6f 6e |ary. In |addition|
|00001360| 2c 20 74 68 65 20 4d 49 | 44 41 53 20 44 79 6e 61 |, the MI|DAS Dyna|
|00001370| 6d 69 63 20 4c 69 6e 6b | 0d 0a 4c 69 62 72 61 72 |mic Link|..Librar|
|00001380| 79 20 28 5c 6d 46 69 6c | 65 4e 61 6d 65 7b 6d 69 |y (\mFil|eName{mi|
|00001390| 64 61 73 58 58 2e 64 6c | 6c 7d 29 20 6e 65 65 64 |dasXX.dl|l}) need|
|000013a0| 73 20 74 6f 20 62 65 20 | 70 6c 61 63 65 64 20 69 |s to be |placed i|
|000013b0| 6e 20 61 20 73 75 69 74 | 61 62 6c 65 20 64 69 72 |n a suit|able dir|
|000013c0| 65 63 74 6f 72 79 0d 0a | 2d 2d 2d 20 65 69 74 68 |ectory..|--- eith|
|000013d0| 65 72 20 74 6f 20 74 68 | 65 20 73 61 6d 65 20 64 |er to th|e same d|
|000013e0| 69 72 65 63 74 6f 72 79 | 20 77 69 74 68 20 74 68 |irectory| with th|
|000013f0| 65 20 70 72 6f 67 72 61 | 6d 20 65 78 65 63 75 74 |e progra|m execut|
|00001400| 61 62 6c 65 2c 20 6f 72 | 20 69 6e 20 73 6f 6d 65 |able, or| in some|
|00001410| 0d 0a 64 69 72 65 63 74 | 6f 72 79 20 69 6e 20 74 |..direct|ory in t|
|00001420| 68 65 20 75 73 65 72 27 | 73 20 50 41 54 48 2e 20 |he user'|s PATH. |
|00001430| 54 68 65 20 69 6d 70 6f | 72 74 20 6c 69 62 72 61 |The impo|rt libra|
|00001440| 72 79 20 6e 61 6d 65 73 | 20 63 6f 72 72 65 73 70 |ry names| corresp|
|00001450| 6f 6e 64 20 74 6f 20 74 | 68 65 0d 0a 5c 6d 46 69 |ond to t|he..\mFi|
|00001460| 6c 65 4e 61 6d 65 7b 2e | 64 6c 6c 7d 20 6e 61 6d |leName{.|dll} nam|
|00001470| 65 3a 20 5c 6d 46 69 6c | 65 4e 61 6d 65 7b 6d 69 |e: \mFil|eName{mi|
|00001480| 64 61 73 58 58 5c 5f 7b | 7d 76 69 73 75 61 6c 63 |dasXX\_{|}visualc|
|00001490| 2e 6c 69 62 7d 20 66 6f | 72 20 56 69 73 75 61 6c |.lib} fo|r Visual|
|000014a0| 20 43 2f 43 2b 2b 20 61 | 6e 64 0d 0a 5c 6d 46 69 | C/C++ a|nd..\mFi|
|000014b0| 6c 65 4e 61 6d 65 7b 6d | 69 64 61 73 58 58 5c 5f |leName{m|idasXX\_|
|000014c0| 7b 7d 77 61 74 63 6f 6d | 2e 6c 69 62 7d 20 66 6f |{}watcom|.lib} fo|
|000014d0| 72 20 57 61 74 63 6f 6d | 20 43 2f 43 2b 2b 2e 20 |r Watcom| C/C++. |
|000014e0| 28 74 68 65 20 58 58 20 | 73 74 61 6e 64 73 20 66 |(the XX |stands f|
|000014f0| 6f 72 20 74 68 65 0d 0a | 4d 49 44 41 53 20 76 65 |or the..|MIDAS ve|
|00001500| 72 73 69 6f 6e 20 6e 75 | 6d 62 65 72 29 2e 0d 0a |rsion nu|mber)...|
|00001510| 0d 0a 44 65 6c 70 68 69 | 20 75 73 65 72 73 20 64 |..Delphi| users d|
|00001520| 6f 20 6e 6f 74 20 6e 65 | 65 64 20 61 20 73 65 70 |o not ne|ed a sep|
|00001530| 61 72 61 74 65 20 69 6d | 70 6f 72 74 20 6c 69 62 |arate im|port lib|
|00001540| 72 61 72 79 20 2d 2d 2d | 20 75 73 69 6e 67 20 74 |rary ---| using t|
|00001550| 68 65 20 69 6e 74 65 72 | 66 61 63 65 0d 0a 75 6e |he inter|face..un|
|00001560| 69 74 20 5c 6d 46 69 6c | 65 4e 61 6d 65 7b 6d 69 |it \mFil|eName{mi|
|00001570| 64 61 73 64 6c 6c 2e 70 | 61 73 7d 20 61 64 64 73 |dasdll.p|as} adds|
|00001580| 20 74 68 65 20 6e 65 63 | 65 73 73 61 72 79 20 72 | the nec|essary r|
|00001590| 65 66 65 72 65 6e 63 65 | 73 20 74 6f 20 74 68 65 |eference|s to the|
|000015a0| 0d 0a 5c 6d 46 69 6c 65 | 4e 61 6d 65 7b 2e 64 6c |..\mFile|Name{.dl|
|000015b0| 6c 7d 20 61 75 74 6f 6d | 61 74 69 63 61 6c 6c 79 |l} autom|atically|
|000015c0| 2e 20 4e 6f 74 65 20 74 | 68 61 74 20 72 75 6e 6e |. Note t|hat runn|
|000015d0| 69 6e 67 20 74 68 65 20 | 70 72 6f 67 72 61 6d 20 |ing the |program |
|000015e0| 75 6e 64 65 72 20 74 68 | 65 0d 0a 44 65 6c 70 68 |under th|e..Delph|
|000015f0| 69 20 49 44 45 20 77 69 | 74 68 6f 75 74 20 74 68 |i IDE wi|thout th|
|00001600| 65 20 5c 6d 46 69 6c 65 | 4e 61 6d 65 7b 2e 64 6c |e \mFile|Name{.dl|
|00001610| 6c 7d 20 61 76 61 69 6c | 61 62 6c 65 20 63 61 6e |l} avail|able can|
|00001620| 20 63 61 75 73 65 20 73 | 74 72 61 6e 67 65 20 65 | cause s|trange e|
|00001630| 72 72 6f 72 0d 0a 6d 65 | 73 73 61 67 65 73 2e 0d |rror..me|ssages..|
|00001640| 0a 0d 0a 0d 0a 0d 0a 5c | 73 75 62 73 65 63 74 69 |.......\|subsecti|
|00001650| 6f 6e 7b 4d 53 2d 44 4f | 53 7d 0d 0a 0d 0a 41 73 |on{MS-DO|S}....As|
|00001660| 20 4d 53 2d 44 4f 53 20 | 64 6f 65 73 6e 27 74 20 | MS-DOS |doesn't |
|00001670| 73 75 70 70 6f 72 74 20 | 64 79 6e 61 6d 69 63 20 |support |dynamic |
|00001680| 6c 69 6e 6b 69 6e 67 2c | 20 6f 6e 6c 79 20 61 20 |linking,| only a |
|00001690| 73 74 61 74 69 63 20 6c | 69 6e 6b 20 6c 69 62 72 |static l|ink libr|
|000016a0| 61 72 79 20 69 73 0d 0a | 70 72 6f 76 69 64 65 64 |ary is..|provided|
|000016b0| 20 66 6f 72 20 4d 53 2d | 44 4f 53 2e 20 59 6f 75 | for MS-|DOS. You|
|000016c0| 27 6c 6c 20 73 69 6d 70 | 6c 79 20 6e 65 65 64 20 |'ll simp|ly need |
|000016d0| 74 6f 20 6c 69 6e 6b 20 | 66 69 6c 65 20 5c 6d 46 |to link |file \mF|
|000016e0| 69 6c 65 4e 61 6d 65 7b | 6d 69 64 61 73 64 6f 73 |ileName{|midasdos|
|000016f0| 2e 6c 69 62 7d 0d 0a 66 | 72 6f 6d 20 74 68 65 20 |.lib}..f|rom the |
|00001700| 5c 6d 46 69 6c 65 4e 61 | 6d 65 7b 6c 69 62 2f 7d |\mFileNa|me{lib/}|
|00001710| 20 73 75 62 64 69 72 65 | 63 74 6f 72 79 20 6f 66 | subdire|ctory of|
|00001720| 20 74 68 65 20 4d 49 44 | 41 53 20 64 69 73 74 72 | the MID|AS distr|
|00001730| 69 62 75 74 69 6f 6e 2c | 20 61 6e 64 20 79 6f 75 |ibution,| and you|
|00001740| 72 0d 0a 70 72 6f 67 72 | 61 6d 20 69 73 20 72 65 |r..progr|am is re|
|00001750| 61 64 79 20 74 6f 20 75 | 73 65 20 4d 49 44 41 53 |ady to u|se MIDAS|
|00001760| 20 53 6f 75 6e 64 20 53 | 79 73 74 65 6d 2e 20 54 | Sound S|ystem. T|
|00001770| 68 65 20 65 78 65 63 75 | 74 61 62 6c 65 20 69 73 |he execu|table is|
|00001780| 20 66 75 6c 6c 79 0d 0a | 73 65 6c 66 2d 63 6f 6e | fully..|self-con|
|00001790| 74 61 69 6e 65 64 2c 20 | 61 6e 64 20 6e 6f 20 61 |tained, |and no a|
|000017a0| 64 64 69 74 69 6f 6e 61 | 6c 20 66 69 6c 65 73 20 |dditiona|l files |
|000017b0| 61 72 65 20 6e 65 65 64 | 65 64 2e 0d 0a 0d 0a 4e |are need|ed.....N|
|000017c0| 6f 74 65 20 74 68 61 74 | 20 73 6f 6d 65 20 76 65 |ote that| some ve|
|000017d0| 72 73 69 6f 6e 73 20 6f | 66 20 74 68 65 20 57 61 |rsions o|f the Wa|
|000017e0| 74 63 6f 6d 20 4c 69 6e | 6b 65 72 20 61 72 65 20 |tcom Lin|ker are |
|000017f0| 6e 6f 74 20 63 61 73 65 | 2d 73 65 6e 73 69 74 69 |not case|-sensiti|
|00001800| 76 65 20 62 79 0d 0a 64 | 65 66 61 75 6c 74 2c 20 |ve by..d|efault, |
|00001810| 61 6e 64 20 79 6f 75 27 | 6c 6c 20 6e 65 65 64 20 |and you'|ll need |
|00001820| 74 6f 20 75 73 65 20 63 | 61 73 65 2d 73 65 6e 73 |to use c|ase-sens|
|00001830| 69 74 69 76 65 20 6c 69 | 6e 6b 69 6e 67 20 77 69 |itive li|nking wi|
|00001840| 74 68 20 4d 49 44 41 53 | 2e 20 54 6f 20 64 6f 0d |th MIDAS|. To do.|
|00001850| 0a 74 68 61 74 2c 20 73 | 69 6d 70 6c 79 20 61 64 |.that, s|imply ad|
|00001860| 64 20 5c 6d 52 65 73 57 | 6f 72 64 7b 6f 70 74 69 |d \mResW|ord{opti|
|00001870| 6f 6e 20 63 61 73 65 65 | 78 61 63 74 7d 20 74 6f |on casee|xact} to|
|00001880| 20 79 6f 75 72 20 6c 69 | 6e 6b 65 72 20 64 69 72 | your li|nker dir|
|00001890| 65 63 74 69 76 65 73 2e | 0d 0a 0d 0a 0d 0a 0d 0a |ectives.|........|
|000018a0| 5c 73 75 62 73 65 63 74 | 69 6f 6e 7b 4c 69 6e 75 |\subsect|ion{Linu|
|000018b0| 78 7d 0d 0a 0d 0a 46 6f | 72 20 4c 69 6e 75 78 2c |x}....Fo|r Linux,|
|000018c0| 20 62 6f 74 68 20 64 79 | 6e 61 6d 69 63 20 61 6e | both dy|namic an|
|000018d0| 64 20 73 74 61 74 69 63 | 20 6c 69 62 72 61 72 69 |d static| librari|
|000018e0| 65 73 20 61 72 65 20 70 | 72 6f 76 69 64 65 64 2e |es are p|rovided.|
|000018f0| 20 54 6f 20 6c 69 6e 6b | 20 79 6f 75 72 0d 0a 70 | To link| your..p|
|00001900| 72 6f 67 72 61 6d 20 77 | 69 74 68 20 4d 49 44 41 |rogram w|ith MIDA|
|00001910| 53 2c 20 61 64 64 20 74 | 68 65 20 4d 49 44 41 53 |S, add t|he MIDAS|
|00001920| 20 6c 69 62 72 61 72 79 | 20 64 69 72 65 63 74 6f | library| directo|
|00001930| 72 79 20 74 6f 20 79 6f | 75 72 20 6c 69 62 72 61 |ry to yo|ur libra|
|00001940| 72 79 20 64 69 72 65 63 | 74 6f 72 79 0d 0a 6c 69 |ry direc|tory..li|
|00001950| 73 74 20 28 67 63 63 20 | 6f 70 74 69 6f 6e 20 5c |st (gcc |option \|
|00001960| 6d 52 65 73 57 6f 72 64 | 7b 2d 4c 7d 29 2c 20 61 |mResWord|{-L}), a|
|00001970| 6e 64 20 6c 69 6e 6b 20 | 74 68 65 20 6c 69 62 72 |nd link |the libr|
|00001980| 61 72 79 20 69 6e 20 75 | 73 69 6e 67 20 74 68 65 |ary in u|sing the|
|00001990| 20 47 43 43 20 6f 70 74 | 69 6f 6e 0d 0a 5c 6d 52 | GCC opt|ion..\mR|
|000019a0| 65 73 57 6f 72 64 7b 2d | 6c 6d 69 64 61 73 7d 2e |esWord{-|lmidas}.|
|000019b0| 20 44 65 70 65 6e 64 69 | 6e 67 20 6f 6e 20 77 68 | Dependi|ng on wh|
|000019c0| 65 74 68 65 72 20 79 6f | 75 20 61 72 65 20 62 75 |ether yo|u are bu|
|000019d0| 69 6c 64 69 6e 67 20 61 | 20 73 74 61 74 69 63 61 |ilding a| statica|
|000019e0| 6c 6c 79 20 6f 72 0d 0a | 64 79 6e 61 6d 69 63 61 |lly or..|dynamica|
|000019f0| 6c 6c 79 20 6c 69 6e 6b | 65 64 20 70 72 6f 67 72 |lly link|ed progr|
|00001a00| 61 6d 2c 20 47 43 43 20 | 77 69 6c 6c 20 61 75 74 |am, GCC |will aut|
|00001a10| 6f 6d 61 74 69 63 61 6c | 6c 79 20 73 65 6c 65 63 |omatical|ly selec|
|00001a20| 74 20 74 68 65 20 63 6f | 72 72 65 63 74 0d 0a 6c |t the co|rrect..l|
|00001a30| 69 62 72 61 72 79 2e 0d | 0a 0d 0a 0d 0a 0d 0a 5c |ibrary..|.......\|
|00001a40| 73 65 63 74 69 6f 6e 7b | 41 6e 20 65 78 61 6d 70 |section{|An examp|
|00001a50| 6c 65 20 70 72 6f 67 72 | 61 6d 7d 0d 0a 0d 0a 54 |le progr|am}....T|
|00001a60| 68 69 73 20 73 65 63 74 | 69 6f 6e 20 64 65 73 63 |his sect|ion desc|
|00001a70| 72 69 62 65 73 20 61 20 | 76 65 72 79 20 73 69 6d |ribes a |very sim|
|00001a80| 70 6c 65 20 65 78 61 6d | 70 6c 65 20 70 72 6f 67 |ple exam|ple prog|
|00001a90| 72 61 6d 20 74 68 61 74 | 20 75 73 65 73 20 4d 49 |ram that| uses MI|
|00001aa0| 44 41 53 20 66 6f 72 0d | 0a 70 6c 61 79 69 6e 67 |DAS for.|.playing|
|00001ab0| 20 6d 75 73 69 63 2e 20 | 46 69 72 73 74 2c 20 74 | music. |First, t|
|00001ac0| 68 65 20 63 6f 6d 70 6c | 65 74 65 20 70 72 6f 67 |he compl|ete prog|
|00001ad0| 72 61 6d 20 73 6f 75 72 | 63 65 20 69 73 20 67 69 |ram sour|ce is gi|
|00001ae0| 76 65 6e 20 69 6e 20 62 | 6f 74 68 20 43 20 61 6e |ven in b|oth C an|
|00001af0| 64 0d 0a 44 65 6c 70 68 | 69 20 66 6f 72 6d 61 74 |d..Delph|i format|
|00001b00| 2c 20 61 6e 64 20 61 66 | 74 65 72 20 74 68 61 74 |, and af|ter that|
|00001b10| 20 74 68 65 20 6f 70 65 | 72 61 74 69 6f 6e 20 6f | the ope|ration o|
|00001b20| 66 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 69 73 |f the pr|ogram is|
|00001b30| 20 64 65 73 63 72 69 62 | 65 64 20 6c 69 6e 65 0d | describ|ed line.|
|00001b40| 0a 62 79 20 6c 69 6e 65 | 2e 20 54 6f 20 6b 65 65 |.by line|. To kee|
|00001b50| 70 20 74 68 65 20 70 72 | 6f 67 72 61 6d 20 61 73 |p the pr|ogram as|
|00001b60| 20 73 68 6f 72 74 20 61 | 73 20 70 6f 73 73 69 62 | short a|s possib|
|00001b70| 6c 65 2c 20 61 6c 6c 20 | 65 72 72 6f 72 20 63 68 |le, all |error ch|
|00001b80| 65 63 6b 69 6e 67 20 69 | 73 0d 0a 6f 6d 69 74 74 |ecking i|s..omitt|
|00001b90| 65 64 2c 20 61 6e 64 20 | 74 68 65 72 65 66 6f 72 |ed, and |therefor|
|00001ba0| 65 20 69 74 20 73 68 6f | 75 6c 64 20 6e 6f 74 20 |e it sho|uld not |
|00001bb0| 62 65 20 75 73 65 64 20 | 61 73 20 61 20 74 65 6d |be used |as a tem|
|00001bc0| 70 6c 61 74 65 20 66 6f | 72 20 62 75 69 6c 64 69 |plate fo|r buildi|
|00001bd0| 6e 67 20 72 65 61 6c 0d | 0a 61 70 70 6c 69 63 61 |ng real.|.applica|
|00001be0| 74 69 6f 6e 73 20 2d 2d | 2d 20 74 68 65 20 6f 74 |tions --|- the ot|
|00001bf0| 68 65 72 20 65 78 61 6d | 70 6c 65 20 70 72 6f 67 |her exam|ple prog|
|00001c00| 72 61 6d 73 20 69 6e 63 | 6c 75 64 65 64 20 69 6e |rams inc|luded in|
|00001c10| 20 74 68 65 20 4d 49 44 | 41 53 0d 0a 64 69 73 74 | the MID|AS..dist|
|00001c20| 72 69 62 75 74 69 6f 6e | 20 61 72 65 20 6d 6f 72 |ribution| are mor|
|00001c30| 65 20 73 75 69 74 61 62 | 6c 65 20 66 6f 72 20 74 |e suitab|le for t|
|00001c40| 68 61 74 2e 0d 0a 0d 0a | 42 6f 74 68 20 76 65 72 |hat.....|Both ver|
|00001c50| 73 69 6f 6e 73 20 6f 66 | 20 74 68 65 20 70 72 6f |sions of| the pro|
|00001c60| 67 72 61 6d 20 73 68 6f | 75 6c 64 20 62 65 20 63 |gram sho|uld be c|
|00001c70| 6f 6d 70 69 6c 65 64 20 | 61 73 20 63 6f 6e 73 6f |ompiled |as conso|
|00001c80| 6c 65 20 61 70 70 6c 69 | 63 61 74 69 6f 6e 73 20 |le appli|cations |
|00001c90| 69 6e 0d 0a 74 68 65 20 | 57 69 6e 33 32 20 65 6e |in..the |Win32 en|
|00001ca0| 76 69 72 6f 6e 6d 65 6e | 74 2e 20 55 6e 64 65 72 |vironmen|t. Under|
|00001cb0| 20 4d 53 2d 44 4f 53 20 | 61 6e 64 20 4c 69 6e 75 | MS-DOS |and Linu|
|00001cc0| 78 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 63 6f |x the de|fault co|
|00001cd0| 6d 70 69 6c 65 72 20 73 | 65 74 74 69 6e 67 73 0d |mpiler s|ettings.|
|00001ce0| 0a 61 72 65 20 66 69 6e | 65 2e 0d 0a 0d 0a 0d 0a |.are fin|e.......|
|00001cf0| 5c 73 75 62 73 65 63 74 | 69 6f 6e 7b 43 20 70 72 |\subsect|ion{C pr|
|00001d00| 6f 67 72 61 6d 7d 0d 0a | 0d 0a 5c 62 65 67 69 6e |ogram}..|..\begin|
|00001d10| 7b 76 65 72 62 61 74 69 | 6d 7d 0d 0a 20 31 20 20 |{verbati|m}.. 1 |
|00001d20| 23 69 6e 63 6c 75 64 65 | 20 3c 73 74 64 69 6f 2e |#include| <stdio.|
|00001d30| 68 3e 0d 0a 20 32 20 20 | 23 69 6e 63 6c 75 64 65 |h>.. 2 |#include|
|00001d40| 20 3c 63 6f 6e 69 6f 2e | 68 3e 0d 0a 20 33 20 20 | <conio.|h>.. 3 |
|00001d50| 23 69 6e 63 6c 75 64 65 | 20 22 6d 69 64 61 73 64 |#include| "midasd|
|00001d60| 6c 6c 2e 68 22 0d 0a 20 | 34 0d 0a 20 35 20 20 69 |ll.h".. |4.. 5 i|
|00001d70| 6e 74 20 6d 61 69 6e 28 | 76 6f 69 64 29 0d 0a 20 |nt main(|void).. |
|00001d80| 36 20 20 7b 0d 0a 20 37 | 20 20 20 20 20 20 4d 49 |6 {.. 7| MI|
|00001d90| 44 41 53 6d 6f 64 75 6c | 65 20 6d 6f 64 75 6c 65 |DASmodul|e module|
|00001da0| 3b 0d 0a 20 38 0d 0a 20 | 39 20 20 20 20 20 20 4d |;.. 8.. |9 M|
|00001db0| 49 44 41 53 73 74 61 72 | 74 75 70 28 29 3b 0d 0a |IDASstar|tup();..|
|00001dc0| 31 30 20 20 20 20 20 20 | 4d 49 44 41 53 69 6e 69 |10 |MIDASini|
|00001dd0| 74 28 29 3b 0d 0a 31 31 | 20 20 20 20 20 20 4d 49 |t();..11| MI|
|00001de0| 44 41 53 73 74 61 72 74 | 42 61 63 6b 67 72 6f 75 |DASstart|Backgrou|
|00001df0| 6e 64 50 6c 61 79 28 30 | 29 3b 0d 0a 31 32 0d 0a |ndPlay(0|);..12..|
|00001e00| 31 33 20 20 20 20 20 20 | 6d 6f 64 75 6c 65 20 3d |13 |module =|
|00001e10| 20 4d 49 44 41 53 6c 6f | 61 64 4d 6f 64 75 6c 65 | MIDASlo|adModule|
|00001e20| 28 22 2e 2e 5c 5c 64 61 | 74 61 5c 5c 74 65 6d 70 |("..\\da|ta\\temp|
|00001e30| 6c 73 75 6e 2e 78 6d 22 | 29 3b 0d 0a 31 34 20 20 |lsun.xm"|);..14 |
|00001e40| 20 20 20 20 4d 49 44 41 | 53 70 6c 61 79 4d 6f 64 | MIDA|SplayMod|
|00001e50| 75 6c 65 28 6d 6f 64 75 | 6c 65 2c 20 30 29 3b 0d |ule(modu|le, 0);.|
|00001e60| 0a 31 35 0d 0a 31 36 20 | 20 20 20 20 20 70 75 74 |.15..16 | put|
|00001e70| 73 28 22 50 6c 61 79 69 | 6e 67 20 2d 20 70 72 65 |s("Playi|ng - pre|
|00001e80| 73 73 20 61 6e 79 20 6b | 65 79 22 29 3b 0d 0a 31 |ss any k|ey");..1|
|00001e90| 37 20 20 20 20 20 20 67 | 65 74 63 68 28 29 3b 0d |7 g|etch();.|
|00001ea0| 0a 31 38 0d 0a 31 39 20 | 20 20 20 20 20 4d 49 44 |.18..19 | MID|
|00001eb0| 41 53 73 74 6f 70 4d 6f | 64 75 6c 65 28 6d 6f 64 |ASstopMo|dule(mod|
|00001ec0| 75 6c 65 29 3b 0d 0a 32 | 30 20 20 20 20 20 20 4d |ule);..2|0 M|
|00001ed0| 49 44 41 53 66 72 65 65 | 4d 6f 64 75 6c 65 28 6d |IDASfree|Module(m|
|00001ee0| 6f 64 75 6c 65 29 3b 0d | 0a 32 31 0d 0a 32 32 20 |odule);.|.21..22 |
|00001ef0| 20 20 20 20 20 4d 49 44 | 41 53 73 74 6f 70 42 61 | MID|ASstopBa|
|00001f00| 63 6b 67 72 6f 75 6e 64 | 50 6c 61 79 28 29 3b 0d |ckground|Play();.|
|00001f10| 0a 32 33 20 20 20 20 20 | 20 4d 49 44 41 53 63 6c |.23 | MIDAScl|
|00001f20| 6f 73 65 28 29 3b 0d 0a | 32 34 0d 0a 32 35 20 20 |ose();..|24..25 |
|00001f30| 20 20 20 20 72 65 74 75 | 72 6e 20 30 3b 0d 0a 32 | retu|rn 0;..2|
|00001f40| 36 20 20 7d 0d 0a 5c 65 | 6e 64 7b 76 65 72 62 61 |6 }..\e|nd{verba|
|00001f50| 74 69 6d 7d 0d 0a 0d 0a | 0d 0a 0d 0a 5c 73 75 62 |tim}....|....\sub|
|00001f60| 73 65 63 74 69 6f 6e 7b | 44 65 6c 70 68 69 20 70 |section{|Delphi p|
|00001f70| 72 6f 67 72 61 6d 7d 0d | 0a 0d 0a 5c 62 65 67 69 |rogram}.|...\begi|
|00001f80| 6e 7b 76 65 72 62 61 74 | 69 6d 7d 0d 0a 31 20 20 |n{verbat|im}..1 |
|00001f90| 20 75 73 65 73 20 6d 69 | 64 61 73 64 6c 6c 3b 0d | uses mi|dasdll;.|
|00001fa0| 0a 32 0d 0a 33 20 20 20 | 76 61 72 20 6d 6f 64 75 |.2..3 |var modu|
|00001fb0| 6c 65 20 3a 20 4d 49 44 | 41 53 6d 6f 64 75 6c 65 |le : MID|ASmodule|
|00001fc0| 3b 0d 0a 34 0d 0a 35 20 | 20 20 42 45 47 49 4e 0d |;..4..5 | BEGIN.|
|00001fd0| 0a 36 20 20 20 20 20 20 | 20 4d 49 44 41 53 73 74 |.6 | MIDASst|
|00001fe0| 61 72 74 75 70 3b 0d 0a | 37 20 20 20 20 20 20 20 |artup;..|7 |
|00001ff0| 4d 49 44 41 53 69 6e 69 | 74 3b 0d 0a 38 20 20 20 |MIDASini|t;..8 |
|00002000| 20 20 20 20 4d 49 44 41 | 53 73 74 61 72 74 42 61 | MIDA|SstartBa|
|00002010| 63 6b 67 72 6f 75 6e 64 | 50 6c 61 79 28 30 29 0d |ckground|Play(0).|
|00002020| 0a 39 0d 0a 31 30 20 20 | 20 20 20 20 6d 6f 64 75 |.9..10 | modu|
|00002030| 6c 65 20 3a 3d 20 4d 49 | 44 41 53 6c 6f 61 64 4d |le := MI|DASloadM|
|00002040| 6f 64 75 6c 65 28 27 2e | 2e 5c 64 61 74 61 5c 74 |odule('.|.\data\t|
|00002050| 65 6d 70 6c 73 75 6e 2e | 78 6d 27 29 3b 0d 0a 31 |emplsun.|xm');..1|
|00002060| 31 20 20 20 20 20 20 4d | 49 44 41 53 70 6c 61 79 |1 M|IDASplay|
|00002070| 4d 6f 64 75 6c 65 28 6d | 6f 64 75 6c 65 2c 20 30 |Module(m|odule, 0|
|00002080| 29 3b 0d 0a 31 32 0d 0a | 31 33 20 20 20 20 20 20 |);..12..|13 |
|00002090| 57 72 69 74 65 4c 6e 28 | 27 50 6c 61 79 69 6e 67 |WriteLn(|'Playing|
|000020a0| 20 2d 20 50 72 65 73 73 | 20 45 6e 74 65 72 27 29 | - Press| Enter')|
|000020b0| 3b 0d 0a 31 34 20 20 20 | 20 20 20 52 65 61 64 4c |;..14 | ReadL|
|000020c0| 6e 3b 0d 0a 31 35 0d 0a | 31 36 20 20 20 20 20 20 |n;..15..|16 |
|000020d0| 4d 49 44 41 53 73 74 6f | 70 4d 6f 64 75 6c 65 28 |MIDASsto|pModule(|
|000020e0| 6d 6f 64 75 6c 65 29 3b | 0d 0a 31 37 20 20 20 20 |module);|..17 |
|000020f0| 20 20 4d 49 44 41 53 66 | 72 65 65 4d 6f 64 75 6c | MIDASf|reeModul|
|00002100| 65 28 6d 6f 64 75 6c 65 | 29 3b 0d 0a 31 38 0d 0a |e(module|);..18..|
|00002110| 31 39 20 20 20 20 20 20 | 4d 49 44 41 53 73 74 6f |19 |MIDASsto|
|00002120| 70 42 61 63 6b 67 72 6f | 75 6e 64 50 6c 61 79 3b |pBackgro|undPlay;|
|00002130| 0d 0a 32 30 20 20 20 20 | 20 20 4d 49 44 41 53 63 |..20 | MIDASc|
|00002140| 6c 6f 73 65 3b 0d 0a 32 | 31 20 20 45 4e 44 2e 0d |lose;..2|1 END..|
|00002150| 0a 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0d |.\end{ve|rbatim}.|
|00002160| 0a 0d 0a 0d 0a 5c 73 75 | 62 73 65 63 74 69 6f 6e |.....\su|bsection|
|00002170| 7b 50 72 6f 67 72 61 6d | 20 64 65 73 63 72 69 70 |{Program| descrip|
|00002180| 74 69 6f 6e 7d 0d 0a 0d | 0a 41 70 61 72 74 20 66 |tion}...|.Apart f|
|00002190| 72 6f 6d 20 6d 69 6e 6f | 72 20 73 79 6e 74 61 78 |rom mino|r syntax|
|000021a0| 20 64 69 66 66 65 72 65 | 6e 63 65 73 2c 20 74 68 | differe|nces, th|
|000021b0| 65 20 43 20 61 6e 64 20 | 44 65 6c 70 68 69 20 76 |e C and |Delphi v|
|000021c0| 65 72 73 69 6f 6e 73 20 | 6f 66 20 74 68 65 20 70 |ersions |of the p|
|000021d0| 72 6f 67 72 61 6d 0d 0a | 77 6f 72 6b 20 6e 65 61 |rogram..|work nea|
|000021e0| 72 6c 79 20 69 64 65 6e | 74 69 63 61 6c 6c 79 2e |rly iden|tically.|
|000021f0| 20 54 68 69 73 20 73 65 | 63 74 69 6f 6e 20 64 65 | This se|ction de|
|00002200| 73 63 72 69 62 65 73 20 | 74 68 65 20 6f 70 65 72 |scribes |the oper|
|00002210| 61 74 69 6f 6e 20 6f 66 | 20 74 68 65 20 70 72 6f |ation of| the pro|
|00002220| 67 72 61 6d 73 0d 0a 6c | 69 6e 65 20 62 79 20 6c |grams..l|ine by l|
|00002230| 69 6e 65 2e 20 54 68 65 | 20 6c 69 6e 65 20 6e 75 |ine. The| line nu|
|00002240| 6d 62 65 72 73 20 62 65 | 6c 6f 77 20 61 72 65 20 |mbers be|low are |
|00002250| 67 69 76 65 6e 20 69 6e | 20 70 61 69 72 73 3a 20 |given in| pairs: |
|00002260| 66 69 72 73 74 20 66 6f | 72 20 43 2c 20 73 65 63 |first fo|r C, sec|
|00002270| 6f 6e 64 0d 0a 66 6f 72 | 20 44 65 6c 70 68 69 2e |ond..for| Delphi.|
|00002280| 0d 0a 0d 0a 5c 62 65 67 | 69 6e 7b 64 65 73 63 72 |....\beg|in{descr|
|00002290| 69 70 74 69 6f 6e 7d 0d | 0a 20 20 20 20 5c 69 74 |iption}.|. \it|
|000022a0| 65 6d 20 5b 31 2d 33 2c | 20 31 5d 20 49 6e 63 6c |em [1-3,| 1] Incl|
|000022b0| 75 64 65 73 20 6e 65 63 | 65 73 73 61 72 79 20 73 |udes nec|essary s|
|000022c0| 79 73 74 65 6d 20 61 6e | 64 20 4d 49 44 41 53 20 |ystem an|d MIDAS |
|000022d0| 64 65 66 69 6e 69 74 69 | 6f 6e 20 66 69 6c 65 73 |definiti|on files|
|000022e0| 0d 0a 20 20 20 20 5c 69 | 74 65 6d 20 5b 37 2c 20 |.. \i|tem [7, |
|000022f0| 33 5d 20 44 65 66 69 6e | 65 73 20 61 20 76 61 72 |3] Defin|es a var|
|00002300| 69 61 62 6c 65 20 66 6f | 72 20 74 68 65 20 6d 6f |iable fo|r the mo|
|00002310| 64 75 6c 65 20 74 68 61 | 74 20 77 69 6c 6c 20 62 |dule tha|t will b|
|00002320| 65 20 70 6c 61 79 65 64 | 0d 0a 20 20 20 20 5c 69 |e played|.. \i|
|00002330| 74 65 6d 20 5b 39 2c 20 | 36 5d 20 52 65 73 65 74 |tem [9, |6] Reset|
|00002340| 73 20 74 68 65 20 4d 49 | 44 41 53 20 69 6e 74 65 |s the MI|DAS inte|
|00002350| 72 6e 61 6c 20 73 74 61 | 74 65 20 2d 2d 2d 20 54 |rnal sta|te --- T|
|00002360| 68 69 73 20 6e 65 65 64 | 73 20 74 6f 20 62 65 20 |his need|s to be |
|00002370| 64 6f 6e 65 0d 0a 20 20 | 20 20 20 20 20 20 62 65 |done.. | be|
|00002380| 66 6f 72 65 20 4d 49 44 | 41 53 20 69 73 20 63 6f |fore MID|AS is co|
|00002390| 6e 66 69 67 75 72 65 64 | 20 61 6e 64 20 69 6e 69 |nfigured| and ini|
|000023a0| 74 69 61 6c 69 7a 65 64 | 2e 0d 0a 20 20 20 20 5c |tialized|... \|
|000023b0| 69 74 65 6d 20 5b 31 30 | 2c 20 37 5d 20 49 6e 69 |item [10|, 7] Ini|
|000023c0| 74 69 61 6c 69 7a 65 73 | 20 4d 49 44 41 53 0d 0a |tializes| MIDAS..|
|000023d0| 20 20 20 20 5c 69 74 65 | 6d 20 5b 31 31 2c 20 38 | \ite|m [11, 8|
|000023e0| 5d 20 53 74 61 72 74 73 | 20 70 6c 61 79 69 6e 67 |] Starts| playing|
|000023f0| 20 73 6f 75 6e 64 20 69 | 6e 20 74 68 65 20 62 61 | sound i|n the ba|
|00002400| 63 6b 67 72 6f 75 6e 64 | 0d 0a 20 20 20 20 5c 69 |ckground|.. \i|
|00002410| 74 65 6d 20 5b 31 33 2c | 20 31 30 5d 20 4c 6f 61 |tem [13,| 10] Loa|
|00002420| 64 73 20 74 68 65 20 6d | 6f 64 75 6c 65 20 66 69 |ds the m|odule fi|
|00002430| 6c 65 0d 0a 20 20 20 20 | 5c 69 74 65 6d 20 5b 31 |le.. |\item [1|
|00002440| 34 2c 20 31 31 5d 20 53 | 74 61 72 74 73 20 70 6c |4, 11] S|tarts pl|
|00002450| 61 79 69 6e 67 20 74 68 | 65 20 6d 6f 64 75 6c 65 |aying th|e module|
|00002460| 20 77 65 20 6a 75 73 74 | 20 6c 6f 61 64 65 64 2c | we just| loaded,|
|00002470| 20 6c 65 61 76 69 6e 67 | 20 6e 6f 0d 0a 20 20 20 | leaving| no.. |
|00002480| 20 20 20 20 20 63 68 61 | 6e 6e 65 6c 73 20 61 76 | cha|nnels av|
|00002490| 61 69 6c 61 62 6c 65 20 | 66 6f 72 20 73 6f 75 6e |ailable |for soun|
|000024a0| 64 20 65 66 66 65 63 74 | 73 2e 0d 0a 20 20 20 20 |d effect|s... |
|000024b0| 5c 69 74 65 6d 20 5b 31 | 36 2d 31 37 2c 20 31 33 |\item [1|6-17, 13|
|000024c0| 2d 31 34 5d 20 53 69 6d | 70 6c 79 20 77 61 69 74 |-14] Sim|ply wait|
|000024d0| 73 20 66 6f 72 20 61 20 | 6b 65 79 70 72 65 73 73 |s for a |keypress|
|000024e0| 0d 0a 20 20 20 20 5c 69 | 74 65 6d 20 5b 31 39 2c |.. \i|tem [19,|
|000024f0| 20 31 36 5d 20 53 74 6f | 70 73 20 70 6c 61 79 69 | 16] Sto|ps playi|
|00002500| 6e 67 20 74 68 65 20 6d | 6f 64 75 6c 65 0d 0a 20 |ng the m|odule.. |
|00002510| 20 20 20 5c 69 74 65 6d | 20 5b 32 30 2c 20 31 37 | \item| [20, 17|
|00002520| 5d 20 44 65 61 6c 6c 6f | 63 61 74 65 73 20 74 68 |] Deallo|cates th|
|00002530| 65 20 6d 6f 64 75 6c 65 | 20 77 65 20 6c 6f 61 64 |e module| we load|
|00002540| 65 64 0d 0a 20 20 20 20 | 5c 69 74 65 6d 20 5b 32 |ed.. |\item [2|
|00002550| 32 2c 20 31 39 5d 20 53 | 74 6f 70 73 20 70 6c 61 |2, 19] S|tops pla|
|00002560| 79 69 6e 67 20 73 6f 75 | 6e 64 20 69 6e 20 74 68 |ying sou|nd in th|
|00002570| 65 20 62 61 63 6b 67 72 | 6f 75 6e 64 0d 0a 20 20 |e backgr|ound.. |
|00002580| 20 20 5c 69 74 65 6d 20 | 5b 32 33 2c 20 32 30 5d | \item |[23, 20]|
|00002590| 20 55 6e 69 6e 69 74 69 | 61 6c 69 7a 65 73 20 74 | Uniniti|alizes t|
|000025a0| 68 65 20 4d 49 44 41 53 | 20 53 6f 75 6e 64 20 53 |he MIDAS| Sound S|
|000025b0| 79 73 74 65 6d 0d 0a 5c | 65 6e 64 7b 64 65 73 63 |ystem..\|end{desc|
|000025c0| 72 69 70 74 69 6f 6e 7d | 0d 0a 0d 0a 0d 0a 0d 0a |ription}|........|
|000025d0| 0d 0a 5c 63 68 61 70 74 | 65 72 7b 4d 49 44 41 53 |..\chapt|er{MIDAS|
|000025e0| 20 63 6f 6e 63 65 70 74 | 73 7d 0d 0a 0d 0a 54 68 | concept|s}....Th|
|000025f0| 69 73 20 63 68 61 70 74 | 65 72 20 64 65 73 63 72 |is chapt|er descr|
|00002600| 69 62 65 73 20 62 61 73 | 69 63 20 4d 49 44 41 53 |ibes bas|ic MIDAS|
|00002610| 20 63 6f 6e 63 65 70 74 | 73 20 61 6e 64 20 74 65 | concept|s and te|
|00002620| 72 6d 69 6e 6f 6c 6f 67 | 79 2e 20 54 68 65 20 64 |rminolog|y. The d|
|00002630| 65 73 63 72 69 70 74 69 | 6f 6e 0d 0a 69 73 20 64 |escripti|on..is d|
|00002640| 6f 6e 65 20 61 74 20 61 | 20 72 61 74 68 65 72 20 |one at a| rather |
|00002650| 68 69 67 68 20 6c 65 76 | 65 6c 2c 20 61 6e 64 20 |high lev|el, and |
|00002660| 69 73 20 6b 65 70 74 20 | 72 61 74 68 65 72 20 69 |is kept |rather i|
|00002670| 6e 66 6f 72 6d 61 6c 20 | 2d 2d 2d 20 74 68 65 20 |nformal |--- the |
|00002680| 69 6e 74 65 6e 74 69 6f | 6e 0d 0a 69 73 20 74 6f |intentio|n..is to|
|00002690| 20 64 6f 63 75 6d 65 6e | 74 20 77 68 61 74 20 74 | documen|t what t|
|000026a0| 68 65 20 64 69 66 66 65 | 72 65 6e 74 20 74 65 72 |he diffe|rent ter|
|000026b0| 6d 73 20 6d 65 61 6e 20 | 66 72 6f 6d 20 74 68 65 |ms mean |from the|
|000026c0| 20 75 73 65 72 27 73 20 | 70 6f 69 6e 74 20 6f 66 | user's |point of|
|000026d0| 20 76 69 65 77 2c 0d 0a | 61 6e 64 20 77 68 61 74 | view,..|and what|
|000026e0| 20 63 61 6e 20 62 65 20 | 64 6f 6e 65 20 77 69 74 | can be |done wit|
|000026f0| 68 20 74 68 65 6d 2c 20 | 72 61 74 68 65 72 20 74 |h them, |rather t|
|00002700| 68 61 6e 20 74 6f 20 67 | 69 76 65 20 64 65 74 61 |han to g|ive deta|
|00002710| 69 6c 65 64 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |iled inf|ormation|
|00002720| 20 6f 6e 0d 0a 74 68 65 | 69 72 20 75 73 61 67 65 | on..the|ir usage|
|00002730| 2e 20 53 74 65 70 2d 62 | 79 2d 73 74 65 70 20 69 |. Step-b|y-step i|
|00002740| 6e 73 74 72 75 63 74 69 | 6f 6e 73 20 66 6f 72 20 |nstructi|ons for |
|00002750| 75 73 69 6e 67 20 74 68 | 65 20 64 69 66 66 65 72 |using th|e differ|
|00002760| 65 6e 74 20 4d 49 44 41 | 53 20 66 65 61 74 75 72 |ent MIDA|S featur|
|00002770| 65 73 0d 0a 69 73 20 61 | 76 61 69 6c 61 62 6c 65 |es..is a|vailable|
|00002780| 20 69 6e 20 74 68 65 20 | 6e 65 78 74 20 63 68 61 | in the |next cha|
|00002790| 70 74 65 72 2e 0d 0a 0d | 0a 0d 0a 5c 73 65 63 74 |pter....|...\sect|
|000027a0| 69 6f 6e 7b 53 61 6d 70 | 6c 65 73 7d 0d 0a 0d 0a |ion{Samp|les}....|
|000027b0| 41 20 73 61 6d 70 6c 65 | 20 69 6e 20 4d 49 44 41 |A sample| in MIDA|
|000027c0| 53 20 53 6f 75 6e 64 20 | 53 79 73 74 65 6d 20 69 |S Sound |System i|
|000027d0| 6e 63 6c 75 64 65 73 20 | 74 68 65 20 73 61 6d 70 |ncludes |the samp|
|000027e0| 6c 65 20 64 61 74 61 20 | 66 6f 72 20 61 20 73 6f |le data |for a so|
|000027f0| 75 6e 64 20 73 61 6d 70 | 6c 65 2c 0d 0a 70 6c 75 |und samp|le,..plu|
|00002800| 73 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 6f 6e |s inform|ation on|
|00002810| 20 69 74 73 20 64 61 74 | 61 20 74 79 70 65 2c 20 | its dat|a type, |
|00002820| 74 68 65 20 73 61 6d 70 | 6c 65 20 6c 65 6e 67 74 |the samp|le lengt|
|00002830| 68 20 61 6e 64 20 6c 6f | 6f 70 69 6e 67 20 69 6e |h and lo|oping in|
|00002840| 66 6f 72 6d 61 74 69 6f | 6e 2e 0d 0a 49 74 20 64 |formatio|n...It d|
|00002850| 6f 65 73 20 6e 6f 74 20 | 63 6f 6e 74 61 69 6e 20 |oes not |contain |
|00002860| 6f 74 68 65 72 20 61 74 | 74 72 69 62 75 74 65 73 |other at|tributes|
|00002870| 20 73 75 63 68 20 61 73 | 20 76 6f 6c 75 6d 65 20 | such as| volume |
|00002880| 6f 72 20 70 61 6e 6e 69 | 6e 67 20 2d 2d 2d 20 74 |or panni|ng --- t|
|00002890| 68 65 73 65 20 61 72 65 | 0d 0a 69 6e 73 74 72 75 |hese are|..instru|
|000028a0| 6d 65 6e 74 20 70 72 6f | 70 65 72 74 69 65 73 2e |ment pro|perties.|
|000028b0| 20 49 6e 20 4d 49 44 41 | 53 2c 20 73 61 6d 70 6c | In MIDA|S, sampl|
|000028c0| 65 73 20 61 72 65 20 6d | 61 6e 61 67 65 64 20 61 |es are m|anaged a|
|000028d0| 6e 64 20 73 74 6f 72 65 | 64 20 62 79 20 62 79 20 |nd store|d by by |
|000028e0| 53 6f 75 6e 64 0d 0a 44 | 65 76 69 63 65 73 2e 20 |Sound..D|evices. |
|000028f0| 41 20 73 61 6d 70 6c 65 | 20 69 73 20 69 64 65 6e |A sample| is iden|
|00002900| 74 69 66 69 65 64 20 62 | 79 20 61 20 73 61 6d 70 |tified b|y a samp|
|00002910| 6c 65 20 68 61 6e 64 6c | 65 2c 20 61 6e 64 20 74 |le handl|e, and t|
|00002920| 68 69 73 20 73 61 6d 70 | 6c 65 20 68 61 6e 64 6c |his samp|le handl|
|00002930| 65 0d 0a 63 61 6e 20 62 | 65 20 75 73 65 64 20 74 |e..can b|e used t|
|00002940| 6f 20 70 6c 61 79 20 74 | 68 65 20 73 61 6d 70 6c |o play t|he sampl|
|00002950| 65 20 6f 72 20 72 65 6d | 6f 76 65 20 69 74 20 66 |e or rem|ove it f|
|00002960| 72 6f 6d 20 53 6f 75 6e | 64 20 44 65 76 69 63 65 |rom Soun|d Device|
|00002970| 20 73 74 6f 72 61 67 65 | 2e 0d 0a 0d 0a 0d 0a 5c | storage|.......\|
|00002980| 73 65 63 74 69 6f 6e 7b | 53 74 72 65 61 6d 73 7d |section{|Streams}|
|00002990| 0d 0a 0d 0a 49 6e 20 4d | 49 44 41 53 2c 20 73 74 |....In M|IDAS, st|
|000029a0| 72 65 61 6d 73 20 61 72 | 65 20 63 6f 6e 74 69 6e |reams ar|e contin|
|000029b0| 75 6f 75 73 20 66 6c 6f | 77 73 20 6f 66 20 73 61 |uous flo|ws of sa|
|000029c0| 6d 70 6c 65 20 64 61 74 | 61 2e 20 55 6e 6c 69 6b |mple dat|a. Unlik|
|000029d0| 65 20 73 61 6d 70 6c 65 | 73 2c 0d 0a 73 74 72 65 |e sample|s,..stre|
|000029e0| 61 6d 73 20 61 72 65 20 | 6e 6f 74 20 73 74 6f 72 |ams are |not stor|
|000029f0| 65 64 20 69 6e 20 74 68 | 65 20 53 6f 75 6e 64 20 |ed in th|e Sound |
|00002a00| 44 65 76 69 63 65 73 20 | 74 68 65 6d 73 65 6c 76 |Devices |themselv|
|00002a10| 65 73 2c 20 62 75 74 20 | 61 72 65 20 69 6e 73 74 |es, but |are inst|
|00002a20| 65 61 64 20 72 65 61 64 | 0d 0a 66 72 6f 6d 20 74 |ead read|..from t|
|00002a30| 68 65 20 73 79 73 74 65 | 6d 20 6d 65 6d 6f 72 79 |he syste|m memory|
|00002a40| 20 61 73 20 74 68 65 79 | 20 61 72 65 20 70 6c 61 | as they| are pla|
|00002a50| 79 65 64 2e 20 42 65 63 | 61 75 73 65 20 6f 66 20 |yed. Bec|ause of |
|00002a60| 74 68 69 73 2c 20 74 68 | 65 20 63 6f 6d 70 6c 65 |this, th|e comple|
|00002a70| 74 65 20 64 61 74 61 0d | 0a 66 6f 72 20 74 68 65 |te data.|.for the|
|00002a80| 20 73 74 72 65 61 6d 20 | 64 6f 65 73 20 6e 6f 74 | stream |does not|
|00002a90| 20 6e 65 65 64 20 74 6f | 20 62 65 20 61 76 61 69 | need to| be avai|
|00002aa0| 6c 61 62 6c 65 20 77 68 | 65 6e 20 70 6c 61 79 69 |lable wh|en playi|
|00002ab0| 6e 67 20 73 74 61 72 74 | 73 2c 20 62 75 74 20 63 |ng start|s, but c|
|00002ac0| 61 6e 0d 0a 69 6e 73 74 | 65 61 64 20 62 65 20 72 |an..inst|ead be r|
|00002ad0| 65 61 64 20 66 72 6f 6d | 20 64 69 73 6b 2c 20 6f |ead from| disk, o|
|00002ae0| 72 20 65 76 65 6e 20 67 | 65 6e 65 72 61 74 65 64 |r even g|enerated|
|00002af0| 20 6f 6e 20 74 68 65 20 | 66 6c 79 2c 20 61 73 20 | on the |fly, as |
|00002b00| 70 6c 61 79 62 61 63 6b | 0d 0a 70 72 6f 63 65 65 |playback|..procee|
|00002b10| 64 73 2e 20 54 68 65 20 | 70 6c 61 79 62 61 63 6b |ds. The |playback|
|00002b20| 20 70 72 6f 70 65 72 74 | 69 65 73 20 6f 66 20 74 | propert|ies of t|
|00002b30| 68 65 20 73 74 72 65 61 | 6d 20 2d 2d 2d 20 73 61 |he strea|m --- sa|
|00002b40| 6d 70 6c 69 6e 67 20 72 | 61 74 65 2c 20 76 6f 6c |mpling r|ate, vol|
|00002b50| 75 6d 65 20 61 6e 64 0d | 0a 70 61 6e 6e 69 6e 67 |ume and.|.panning|
|00002b60| 20 2d 2d 2d 20 63 61 6e | 20 62 65 20 63 68 61 6e | --- can| be chan|
|00002b70| 67 65 64 20 69 6e 20 72 | 65 61 6c 20 74 69 6d 65 |ged in r|eal time|
|00002b80| 20 6a 75 73 74 20 6c 69 | 6b 65 20 74 68 6f 73 65 | just li|ke those|
|00002b90| 20 6f 66 20 61 20 73 61 | 6d 70 6c 65 2e 20 48 6f | of a sa|mple. Ho|
|00002ba0| 77 65 76 65 72 2c 0d 0a | 61 73 20 74 68 65 20 73 |wever,..|as the s|
|00002bb0| 61 6d 70 6c 65 20 64 61 | 74 61 20 66 6f 72 20 74 |ample da|ta for t|
|00002bc0| 68 65 20 73 74 72 65 61 | 6d 20 69 73 20 6e 6f 74 |he strea|m is not|
|00002bd0| 20 73 74 6f 72 65 64 20 | 61 6e 79 77 68 65 72 65 | stored |anywhere|
|00002be0| 20 69 6e 20 74 68 65 20 | 53 6f 75 6e 64 20 44 65 | in the |Sound De|
|00002bf0| 76 69 63 65 2c 0d 0a 65 | 61 63 68 20 73 74 72 65 |vice,..e|ach stre|
|00002c00| 61 6d 20 63 61 6e 20 6f | 6e 6c 79 20 62 65 20 70 |am can o|nly be p|
|00002c10| 6c 61 79 65 64 20 6f 6e | 63 65 2e 0d 0a 0d 0a 54 |layed on|ce.....T|
|00002c20| 68 65 20 4d 49 44 41 53 | 20 41 50 49 20 6f 66 66 |he MIDAS| API off|
|00002c30| 65 72 73 20 74 68 72 65 | 65 20 77 61 79 73 20 66 |ers thre|e ways f|
|00002c40| 6f 72 20 70 6c 61 79 69 | 6e 67 20 73 74 72 65 61 |or playi|ng strea|
|00002c50| 6d 73 3a 20 66 69 6c 65 | 20 70 6c 61 79 62 61 63 |ms: file| playbac|
|00002c60| 6b 2c 20 70 6f 6c 6c 69 | 6e 67 0d 0a 70 6c 61 79 |k, polli|ng..play|
|00002c70| 62 61 63 6b 20 61 6e 64 | 20 63 61 6c 6c 62 61 63 |back and| callbac|
|00002c80| 6b 73 2e 20 46 6f 72 20 | 66 69 6c 65 20 70 6c 61 |ks. For |file pla|
|00002c90| 79 62 61 63 6b 2c 20 74 | 68 65 20 61 70 70 6c 69 |yback, t|he appli|
|00002ca0| 63 61 74 69 6f 6e 20 73 | 69 6d 70 6c 79 20 73 75 |cation s|imply su|
|00002cb0| 70 70 6c 69 65 73 0d 0a | 74 68 65 20 73 79 73 74 |pplies..|the syst|
|00002cc0| 65 6d 20 74 68 65 20 6e | 61 6d 65 20 6f 66 20 74 |em the n|ame of t|
|00002cd0| 68 65 20 66 69 6c 65 20 | 63 6f 6e 74 61 69 6e 69 |he file |containi|
|00002ce0| 6e 67 20 74 68 65 20 73 | 61 6d 70 6c 65 20 64 61 |ng the s|ample da|
|00002cf0| 74 61 20 66 6f 72 20 74 | 68 65 20 73 74 72 65 61 |ta for t|he strea|
|00002d00| 6d 2c 0d 0a 61 6e 64 20 | 70 6c 61 79 62 61 63 6b |m,..and |playback|
|00002d10| 20 70 72 6f 63 65 65 64 | 73 20 61 75 74 6f 6d 61 | proceed|s automa|
|00002d20| 74 69 63 61 6c 6c 79 2e | 20 49 6e 20 70 6f 6c 6c |tically.| In poll|
|00002d30| 69 6e 67 20 70 6c 61 79 | 62 61 63 6b 20 6d 6f 64 |ing play|back mod|
|00002d40| 65 2c 20 74 68 65 0d 0a | 61 70 70 6c 69 63 61 74 |e, the..|applicat|
|00002d50| 69 6f 6e 20 6f 70 65 6e | 73 20 74 68 65 20 73 74 |ion open|s the st|
|00002d60| 72 65 61 6d 20 61 6e 64 | 20 70 65 72 69 6f 64 69 |ream and| periodi|
|00002d70| 63 61 6c 6c 79 20 66 65 | 65 64 73 20 6e 65 77 20 |cally fe|eds new |
|00002d80| 73 61 6d 70 6c 65 20 64 | 61 74 61 20 74 6f 20 62 |sample d|ata to b|
|00002d90| 65 0d 0a 70 6c 61 79 65 | 64 2e 20 49 6e 20 63 61 |e..playe|d. In ca|
|00002da0| 6c 6c 62 61 63 6b 20 6d | 6f 64 65 2c 20 74 68 65 |llback m|ode, the|
|00002db0| 20 61 70 70 6c 69 63 61 | 74 69 6f 6e 20 73 65 74 | applica|tion set|
|00002dc0| 73 20 61 20 63 61 6c 6c | 62 61 63 6b 20 66 75 6e |s a call|back fun|
|00002dd0| 63 74 69 6f 6e 20 74 68 | 61 74 20 69 73 0d 0a 63 |ction th|at is..c|
|00002de0| 61 6c 6c 65 64 20 65 61 | 63 68 20 74 69 6d 65 20 |alled ea|ch time |
|00002df0| 74 68 65 20 73 74 72 65 | 61 6d 20 62 75 66 66 65 |the stre|am buffe|
|00002e00| 72 20 6c 6f 6f 70 73 2c | 20 61 6e 64 20 63 61 6e |r loops,| and can|
|00002e10| 20 74 68 65 72 65 20 66 | 69 6c 6c 20 74 68 65 20 | there f|ill the |
|00002e20| 62 75 66 66 65 72 20 77 | 69 74 68 0d 0a 6e 65 77 |buffer w|ith..new|
|00002e30| 20 73 61 6d 70 6c 65 20 | 64 61 74 61 2e 0d 0a 0d | sample |data....|
|00002e40| 0a 54 68 65 20 6d 6f 73 | 74 20 6f 62 76 69 6f 75 |.The mos|t obviou|
|00002e50| 73 20 75 73 65 20 66 6f | 72 20 73 74 72 65 61 6d |s use fo|r stream|
|00002e60| 73 20 69 73 20 74 6f 20 | 70 6c 61 79 20 6c 6f 6e |s is to |play lon|
|00002e70| 67 20 73 65 63 74 69 6f | 6e 73 20 6f 66 20 64 69 |g sectio|ns of di|
|00002e80| 67 69 74 61 6c 20 73 6f | 75 6e 64 20 6f 72 0d 0a |gital so|und or..|
|00002e90| 6d 75 73 69 63 20 64 69 | 72 65 63 74 6c 79 20 66 |music di|rectly f|
|00002ea0| 72 6f 6d 20 64 69 73 6b | 2c 20 77 69 74 68 6f 75 |rom disk|, withou|
|00002eb0| 74 20 6e 65 65 64 69 6e | 67 20 74 6f 20 6c 6f 61 |t needin|g to loa|
|00002ec0| 64 20 65 76 65 72 79 74 | 68 69 6e 67 20 69 6e 74 |d everyt|hing int|
|00002ed0| 6f 20 6d 65 6d 6f 72 79 | 0d 0a 66 69 72 73 74 2e |o memory|..first.|
|00002ee0| 20 53 74 72 65 61 6d 20 | 70 6c 61 79 62 61 63 6b | Stream |playback|
|00002ef0| 20 63 6f 75 6c 64 20 61 | 6c 73 6f 20 62 65 20 75 | could a|lso be u|
|00002f00| 73 65 64 20 74 6f 20 6d | 69 78 20 74 68 65 20 6f |sed to m|ix the o|
|00002f10| 75 74 70 75 74 20 6f 66 | 20 61 20 73 65 70 61 72 |utput of| a separ|
|00002f20| 61 74 65 0d 0a 73 6f 75 | 6e 64 20 67 65 6e 65 72 |ate..sou|nd gener|
|00002f30| 61 74 6f 72 2c 20 73 75 | 63 68 20 61 73 20 61 20 |ator, su|ch as a |
|00002f40| 73 70 65 65 63 68 20 73 | 79 6e 74 68 65 73 69 7a |speech s|ynthesiz|
|00002f50| 65 72 2c 20 77 69 74 68 | 20 74 68 65 20 72 65 73 |er, with| the res|
|00002f60| 74 20 6f 66 20 74 68 65 | 20 73 6f 75 6e 64 20 61 |t of the| sound a|
|00002f70| 6e 64 0d 0a 6d 75 73 69 | 63 20 69 6e 20 74 68 65 |nd..musi|c in the|
|00002f80| 20 73 79 73 74 65 6d 2e | 0d 0a 0d 0a 43 75 72 72 | system.|....Curr|
|00002f90| 65 6e 74 6c 79 20 73 74 | 72 65 61 6d 73 20 63 61 |ently st|reams ca|
|00002fa0| 6e 20 6f 6e 6c 79 20 62 | 65 20 70 6c 61 79 65 64 |n only b|e played|
|00002fb0| 20 77 69 74 68 20 73 6f | 66 74 77 61 72 65 20 6d | with so|ftware m|
|00002fc0| 69 78 69 6e 67 20 53 6f | 75 6e 64 20 44 65 76 69 |ixing So|und Devi|
|00002fd0| 63 65 73 2e 20 49 6e 0d | 0a 61 64 64 69 74 69 6f |ces. In.|.additio|
|00002fe0| 6e 2c 20 66 69 6c 65 20 | 70 6c 61 79 62 61 63 6b |n, file |playback|
|00002ff0| 20 69 73 20 6f 6e 6c 79 | 20 70 6f 73 73 69 62 6c | is only| possibl|
|00003000| 65 20 75 6e 64 65 72 20 | 6f 70 65 72 61 74 69 6e |e under |operatin|
|00003010| 67 20 73 79 73 74 65 6d | 73 20 74 68 61 74 0d 0a |g system|s that..|
|00003020| 73 75 70 70 6f 72 74 20 | 6d 75 6c 74 69 74 68 72 |support |multithr|
|00003030| 65 61 64 69 6e 67 2e 0d | 0a 0d 0a 0d 0a 5c 73 65 |eading..|.....\se|
|00003040| 63 74 69 6f 6e 7b 43 68 | 61 6e 6e 65 6c 73 7d 0d |ction{Ch|annels}.|
|00003050| 0a 0d 0a 49 6e 20 4d 49 | 44 41 53 20 53 6f 75 6e |...In MI|DAS Soun|
|00003060| 64 20 53 79 73 74 65 6d | 2c 20 63 68 61 6e 6e 65 |d System|, channe|
|00003070| 6c 73 20 61 72 65 20 75 | 73 65 64 20 74 6f 20 70 |ls are u|sed to p|
|00003080| 6c 61 79 20 74 68 65 20 | 73 6f 75 6e 64 2e 20 45 |lay the |sound. E|
|00003090| 61 63 68 20 63 68 61 6e | 6e 65 6c 20 63 61 6e 0d |ach chan|nel can.|
|000030a0| 0a 70 6c 61 79 20 6f 6e | 65 20 73 61 6d 70 6c 65 |.play on|e sample|
|000030b0| 20 6f 72 20 73 74 72 65 | 61 6d 20 61 74 20 61 20 | or stre|am at a |
|000030c0| 74 69 6d 65 2c 20 65 69 | 74 68 65 72 20 6d 6f 6e |time, ei|ther mon|
|000030d0| 6f 20 6f 72 20 73 74 65 | 72 65 6f 2e 20 57 68 65 |o or ste|reo. Whe|
|000030e0| 6e 20 61 20 6e 65 77 20 | 73 6f 75 6e 64 0d 0a 69 |n a new |sound..i|
|000030f0| 73 20 70 6c 61 79 65 64 | 20 6f 6e 20 61 20 63 68 |s played| on a ch|
|00003100| 61 6e 6e 65 6c 2c 20 74 | 68 65 20 6f 6c 64 20 6f |annel, t|he old o|
|00003110| 6e 65 20 69 73 20 72 65 | 6d 6f 76 65 64 2e 20 41 |ne is re|moved. A|
|00003120| 20 63 68 61 6e 6e 65 6c | 20 69 73 20 69 64 65 6e | channel| is iden|
|00003130| 74 69 66 69 65 64 20 62 | 79 20 61 0d 0a 63 68 61 |tified b|y a..cha|
|00003140| 6e 6e 65 6c 20 6e 75 6d | 62 65 72 2c 20 77 68 69 |nnel num|ber, whi|
|00003150| 63 68 20 72 61 6e 67 65 | 20 66 72 6f 6d 20 7a 65 |ch range| from ze|
|00003160| 72 6f 20 75 70 77 61 72 | 64 73 2e 0d 0a 0d 0a 42 |ro upwar|ds.....B|
|00003170| 65 66 6f 72 65 20 61 6e | 79 20 73 6f 75 6e 64 20 |efore an|y sound |
|00003180| 63 61 6e 20 62 65 20 70 | 6c 61 79 65 64 2c 20 61 |can be p|layed, a|
|00003190| 20 6e 75 6d 62 65 72 20 | 6f 66 20 63 68 61 6e 6e | number |of chann|
|000031a0| 65 6c 73 20 6d 75 73 74 | 20 62 65 20 6f 70 65 6e |els must| be open|
|000031b0| 65 64 20 66 72 6f 6d 20 | 74 68 65 0d 0a 53 6f 75 |ed from |the..Sou|
|000031c0| 6e 64 20 44 65 76 69 63 | 65 2e 20 4d 49 44 41 53 |nd Devic|e. MIDAS|
|000031d0| 20 73 75 70 70 6f 72 74 | 73 20 61 6e 20 75 6e 6c | support|s an unl|
|000031e0| 69 6d 69 74 65 64 20 6e | 75 6d 62 65 72 20 6f 66 |imited n|umber of|
|000031f0| 20 63 68 61 6e 6e 65 6c | 73 20 6f 6e 20 61 6c 6c | channel|s on all|
|00003200| 0d 0a 70 6c 61 74 66 6f | 72 6d 73 2c 20 75 6e 6c |..platfo|rms, unl|
|00003210| 65 73 73 20 68 61 72 64 | 77 61 72 65 20 6d 69 78 |ess hard|ware mix|
|00003220| 69 6e 67 20 69 73 20 75 | 73 65 64 2e 20 41 6c 74 |ing is u|sed. Alt|
|00003230| 68 6f 75 67 68 20 74 68 | 65 20 6e 75 6d 62 65 72 |hough th|e number|
|00003240| 20 6f 66 20 6f 70 65 6e | 0d 0a 63 68 61 6e 6e 65 | of open|..channe|
|00003250| 6c 73 20 68 61 73 20 73 | 6f 6d 65 20 69 6d 70 61 |ls has s|ome impa|
|00003260| 63 74 20 6f 6e 20 43 50 | 55 20 75 73 61 67 65 2c |ct on CP|U usage,|
|00003270| 20 74 68 65 20 61 6d 6f | 75 6e 74 20 6f 66 20 43 | the amo|unt of C|
|00003280| 50 55 20 70 6f 77 65 72 | 20 75 73 65 64 20 64 65 |PU power| used de|
|00003290| 70 65 6e 64 73 0d 0a 6d | 6f 73 74 6c 79 20 6f 6e |pends..m|ostly on|
|000032a0| 20 74 68 65 20 63 68 61 | 6e 6e 65 6c 73 20 74 68 | the cha|nnels th|
|000032b0| 61 74 20 61 63 74 75 61 | 6c 6c 79 20 70 6c 61 79 |at actua|lly play|
|000032c0| 20 73 6f 75 6e 64 2e 20 | 54 68 65 72 65 66 6f 72 | sound. |Therefor|
|000032d0| 65 20 69 74 20 69 73 20 | 6d 75 63 68 20 6d 6f 72 |e it is |much mor|
|000032e0| 65 0d 0a 69 6d 70 6f 72 | 74 61 6e 74 20 74 6f 20 |e..impor|tant to |
|000032f0| 65 6e 73 75 72 65 20 74 | 68 61 74 20 6e 6f 20 75 |ensure t|hat no u|
|00003300| 6e 6e 65 63 65 73 73 61 | 72 79 20 73 6f 75 6e 64 |nnecessa|ry sound|
|00003310| 73 20 61 72 65 20 6c 65 | 66 74 20 70 6c 61 79 69 |s are le|ft playi|
|00003320| 6e 67 20 74 68 61 6e 20 | 69 74 20 69 73 20 74 6f |ng than |it is to|
|00003330| 0d 0a 6d 69 6e 69 6d 69 | 7a 65 20 74 68 65 20 6e |..minimi|ze the n|
|00003340| 75 6d 62 65 72 20 6f 66 | 20 6f 70 65 6e 20 63 68 |umber of| open ch|
|00003350| 61 6e 6e 65 6c 73 2e 0d | 0a 0d 0a 0d 0a 5c 73 65 |annels..|.....\se|
|00003360| 63 74 69 6f 6e 7b 50 61 | 6e 6e 69 6e 67 7d 0d 0a |ction{Pa|nning}..|
|00003370| 0d 0a 50 61 6e 6e 69 6e | 67 20 69 6e 20 4d 49 44 |..Pannin|g in MID|
|00003380| 41 53 20 53 6f 75 6e 64 | 20 53 79 73 74 65 6d 20 |AS Sound| System |
|00003390| 61 66 66 65 63 74 73 20 | 74 68 65 20 61 70 70 61 |affects |the appa|
|000033a0| 72 65 6e 74 20 70 6f 73 | 69 74 69 6f 6e 20 6f 66 |rent pos|ition of|
|000033b0| 20 74 68 65 20 73 6f 75 | 6e 64 20 69 6e 0d 0a 73 | the sou|nd in..s|
|000033c0| 74 65 72 65 6f 20 65 6e | 76 69 72 6f 6e 6d 65 6e |tereo en|vironmen|
|000033d0| 74 73 2e 20 53 6f 75 6e | 64 20 70 61 6e 6e 65 64 |ts. Soun|d panned|
|000033e0| 20 74 6f 20 60 60 6c 65 | 66 74 27 27 20 77 69 6c | to ``le|ft'' wil|
|000033f0| 6c 20 62 65 20 70 6c 61 | 79 65 64 20 66 72 6f 6d |l be pla|yed from|
|00003400| 20 74 68 65 20 6c 65 66 | 74 0d 0a 73 70 65 61 6b | the lef|t..speak|
|00003410| 65 72 2c 20 60 60 72 69 | 67 68 74 27 27 20 66 72 |er, ``ri|ght'' fr|
|00003420| 6f 6d 20 74 68 65 20 72 | 69 67 68 74 20 6f 6e 65 |om the r|ight one|
|00003430| 20 61 6e 64 20 60 60 6d | 69 64 64 6c 65 27 27 20 | and ``m|iddle'' |
|00003440| 66 72 6f 6d 20 62 6f 74 | 68 2e 20 36 34 20 64 69 |from bot|h. 64 di|
|00003450| 66 66 65 72 65 6e 74 0d | 0a 70 61 6e 6e 69 6e 67 |fferent.|.panning|
|00003460| 20 70 6f 73 69 74 69 6f | 6e 73 20 61 72 65 20 61 | positio|ns are a|
|00003470| 76 61 69 6c 61 62 6c 65 | 20 62 65 74 77 65 65 6e |vailable| between|
|00003480| 20 60 60 6c 65 66 74 27 | 27 20 61 6e 64 20 60 60 | ``left'|' and ``|
|00003490| 6d 69 64 64 6c 65 27 27 | 20 70 6c 75 73 0d 0a 60 |middle''| plus..`|
|000034a0| 60 72 69 67 68 74 27 27 | 20 61 6e 64 20 60 60 6d |`right''| and ``m|
|000034b0| 69 64 64 6c 65 27 27 2c | 20 74 6f 20 67 69 76 65 |iddle'',| to give|
|000034c0| 20 73 6d 6f 6f 74 68 20 | 63 6f 6e 74 72 6f 6c 20 | smooth |control |
|000034d0| 6f 6e 20 74 68 65 20 73 | 6f 75 6e 64 20 70 6f 73 |on the s|ound pos|
|000034e0| 69 74 69 6f 6e 2e 0d 0a | 0d 0a 49 6e 20 61 64 64 |ition...|..In add|
|000034f0| 69 74 69 6f 6e 2c 20 73 | 75 72 72 6f 75 6e 64 20 |ition, s|urround |
|00003500| 73 6f 75 6e 64 20 69 73 | 20 61 6c 73 6f 20 63 6f |sound is| also co|
|00003510| 6e 73 69 64 65 72 65 64 | 20 61 20 73 65 70 61 72 |nsidered| a separ|
|00003520| 61 74 65 20 70 61 6e 6e | 69 6e 67 20 70 6f 73 69 |ate pann|ing posi|
|00003530| 74 69 6f 6e 2e 0d 0a 53 | 6f 75 6e 64 73 20 70 6c |tion...S|ounds pl|
|00003540| 61 79 65 64 20 77 69 74 | 68 20 74 68 65 69 72 20 |ayed wit|h their |
|00003550| 70 61 6e 6e 69 6e 67 20 | 70 6f 73 69 74 69 6f 6e |panning |position|
|00003560| 20 73 65 74 20 74 6f 20 | 60 60 73 75 72 72 6f 75 | set to |``surrou|
|00003570| 6e 64 27 27 20 61 72 65 | 20 70 6c 61 79 65 64 20 |nd'' are| played |
|00003580| 66 72 6f 6d 0d 0a 74 68 | 65 20 73 75 72 72 6f 75 |from..th|e surrou|
|00003590| 6e 64 20 73 70 65 61 6b | 65 72 73 20 69 66 20 74 |nd speak|ers if t|
|000035a0| 68 65 20 63 6f 6d 70 75 | 74 65 72 20 69 73 20 63 |he compu|ter is c|
|000035b0| 6f 6e 6e 65 63 74 65 64 | 20 74 6f 20 61 20 73 75 |onnected| to a su|
|000035c0| 72 72 6f 75 6e 64 20 64 | 65 63 6f 64 65 72 2e 0d |rround d|ecoder..|
|000035d0| 0a 45 76 65 6e 20 69 66 | 20 73 75 72 72 6f 75 6e |.Even if| surroun|
|000035e0| 64 20 65 71 75 69 70 6d | 65 6e 74 20 69 73 20 6e |d equipm|ent is n|
|000035f0| 6f 74 20 61 76 61 69 6c | 61 62 6c 65 2c 20 74 68 |ot avail|able, th|
|00003600| 65 20 73 6f 75 6e 64 20 | 61 70 70 65 61 72 73 20 |e sound |appears |
|00003610| 74 6f 20 63 6f 6d 65 20 | 66 72 6f 6d 0d 0a 61 72 |to come |from..ar|
|00003620| 6f 75 6e 64 20 74 68 65 | 20 6c 69 73 74 65 6e 65 |ound the| listene|
|00003630| 72 27 73 20 68 65 61 64 | 2c 20 6e 6f 74 20 66 72 |r's head|, not fr|
|00003640| 6f 6d 20 69 6e 73 69 64 | 65 20 69 74 20 61 73 20 |om insid|e it as |
|00003650| 69 6e 20 60 60 6d 69 64 | 64 6c 65 27 27 20 70 61 |in ``mid|dle'' pa|
|00003660| 6e 6e 69 6e 67 0d 0a 70 | 6f 73 69 74 69 6f 6e 2e |nning..p|osition.|
|00003670| 0d 0a 0d 0a 4e 6f 74 65 | 20 74 68 61 74 20 6e 6f |....Note| that no|
|00003680| 74 20 61 6c 6c 20 53 6f | 75 6e 64 20 44 65 76 69 |t all So|und Devi|
|00003690| 63 65 73 20 6e 65 63 65 | 73 73 61 72 69 6c 79 20 |ces nece|ssarily |
|000036a0| 73 75 70 70 6f 72 74 20 | 73 75 72 72 6f 75 6e 64 |support |surround|
|000036b0| 20 73 6f 75 6e 64 2e 0d | 0a 46 75 72 74 68 65 72 | sound..|.Further|
|000036c0| 6d 6f 72 65 2c 20 69 66 | 20 74 68 65 20 63 6f 6d |more, if| the com|
|000036d0| 70 75 74 65 72 20 69 73 | 20 70 6c 61 79 69 6e 67 |puter is| playing|
|000036e0| 20 69 6e 20 73 74 65 72 | 65 6f 20 6d 6f 64 65 2c | in ster|eo mode,|
|000036f0| 20 62 75 74 20 63 6f 6e | 6e 65 63 74 65 64 20 74 | but con|nected t|
|00003700| 6f 20 6d 6f 6e 6f 0d 0a | 65 71 75 69 70 6d 65 6e |o mono..|equipmen|
|00003710| 74 2c 20 61 6c 6c 20 73 | 6f 75 6e 64 73 20 70 6c |t, all s|ounds pl|
|00003720| 61 79 65 64 20 69 6e 20 | 60 60 73 75 72 72 6f 75 |ayed in |``surrou|
|00003730| 6e 64 27 27 20 77 69 6c | 6c 20 64 69 73 61 70 70 |nd'' wil|l disapp|
|00003740| 65 61 72 21 0d 0a 0d 0a | 0d 0a 5c 73 65 63 74 69 |ear!....|..\secti|
|00003750| 6f 6e 7b 53 6f 66 74 77 | 61 72 65 20 61 6e 64 20 |on{Softw|are and |
|00003760| 68 61 72 64 77 61 72 65 | 20 6d 69 78 69 6e 67 7d |hardware| mixing}|
|00003770| 0d 0a 0d 0a 4d 6f 73 74 | 20 73 6f 75 6e 64 20 63 |....Most| sound c|
|00003780| 61 72 64 73 20 73 75 70 | 70 6f 72 74 65 64 20 62 |ards sup|ported b|
|00003790| 79 20 4d 49 44 41 53 20 | 53 6f 75 6e 64 20 53 79 |y MIDAS |Sound Sy|
|000037a0| 73 74 65 6d 20 61 72 65 | 20 6f 6e 6c 79 20 63 61 |stem are| only ca|
|000037b0| 70 61 62 6c 65 20 6f 66 | 20 70 6c 61 79 69 6e 67 |pable of| playing|
|000037c0| 0d 0a 6f 6e 65 20 64 69 | 67 69 74 61 6c 20 73 6f |..one di|gital so|
|000037d0| 75 6e 64 20 63 68 61 6e | 6e 65 6c 20 61 74 20 61 |und chan|nel at a|
|000037e0| 20 74 69 6d 65 2c 20 62 | 75 74 20 73 74 69 6c 6c | time, b|ut still|
|000037f0| 20 4d 49 44 41 53 20 73 | 75 70 70 6f 72 74 73 20 | MIDAS s|upports |
|00003800| 61 6e 20 75 6e 6c 69 6d | 69 74 65 64 0d 0a 6e 75 |an unlim|ited..nu|
|00003810| 6d 62 65 72 20 6f 66 20 | 63 68 61 6e 6e 65 6c 73 |mber of |channels|
|00003820| 20 77 69 74 68 20 74 68 | 65 6d 2e 20 54 68 69 73 | with th|em. This|
|00003830| 20 69 73 20 61 63 63 6f | 6d 70 6c 69 73 68 65 64 | is acco|mplished|
|00003840| 20 74 68 72 6f 75 67 68 | 20 73 6f 66 74 77 61 72 | through| softwar|
|00003850| 65 20 6d 69 78 69 6e 67 | 20 6f 66 0d 0a 74 68 65 |e mixing| of..the|
|00003860| 20 73 6f 75 6e 64 20 2d | 2d 2d 20 74 68 65 20 73 | sound -|-- the s|
|00003870| 6f 75 6e 64 20 63 68 61 | 6e 6e 65 6c 73 20 61 72 |ound cha|nnels ar|
|00003880| 65 20 6d 69 78 65 64 20 | 64 69 67 69 74 61 6c 6c |e mixed |digitall|
|00003890| 79 20 74 6f 67 65 74 68 | 65 72 20 62 65 66 6f 72 |y togeth|er befor|
|000038a0| 65 20 70 61 73 73 69 6e | 67 0d 0a 74 68 65 20 73 |e passin|g..the s|
|000038b0| 6f 75 6e 64 20 74 6f 20 | 74 68 65 20 73 6f 75 6e |ound to |the soun|
|000038c0| 64 20 63 61 72 64 2e 0d | 0a 0d 0a 4d 69 78 69 6e |d card..|...Mixin|
|000038d0| 67 20 74 68 65 20 73 6f | 75 6e 64 20 69 6e 20 73 |g the so|und in s|
|000038e0| 6f 66 74 77 61 72 65 20 | 69 73 20 61 20 63 6f 6d |oftware |is a com|
|000038f0| 70 6c 69 63 61 74 65 64 | 20 70 72 6f 63 65 73 73 |plicated| process|
|00003900| 2c 20 61 6e 64 2c 20 61 | 6c 74 68 6f 75 67 68 20 |, and, a|lthough |
|00003910| 4d 49 44 41 53 0d 0a 6d | 69 78 69 6e 67 20 72 6f |MIDAS..m|ixing ro|
|00003920| 75 74 69 6e 65 73 20 61 | 72 65 20 63 61 72 65 66 |utines a|re caref|
|00003930| 75 6c 6c 79 20 6f 70 74 | 69 6d 69 7a 65 64 2c 20 |ully opt|imized, |
|00003940| 63 61 6e 20 73 74 69 6c | 6c 20 74 61 6b 65 20 61 |can stil|l take a|
|00003950| 20 63 6f 6e 73 69 64 65 | 72 61 62 6c 65 20 61 6d | conside|rable am|
|00003960| 6f 75 6e 74 0d 0a 6f 66 | 20 43 50 55 20 74 69 6d |ount..of| CPU tim|
|00003970| 65 2e 20 54 68 65 20 43 | 50 55 20 74 69 6d 65 20 |e. The C|PU time |
|00003980| 75 73 65 64 20 69 73 20 | 64 65 74 65 72 6d 69 6e |used is |determin|
|00003990| 65 64 20 62 79 20 66 6f | 75 72 20 66 61 63 74 6f |ed by fo|ur facto|
|000039a0| 72 73 3a 20 54 68 65 20 | 6e 75 6d 62 65 72 20 6f |rs: The |number o|
|000039b0| 66 0d 0a 63 68 61 6e 6e | 65 6c 73 20 61 63 74 69 |f..chann|els acti|
|000039c0| 76 65 2c 20 74 68 65 20 | 6d 69 78 69 6e 67 20 72 |ve, the |mixing r|
|000039d0| 61 74 65 2c 20 74 68 65 | 20 6f 75 74 70 75 74 20 |ate, the| output |
|000039e0| 6d 6f 64 65 20 61 6e 64 | 20 74 68 65 20 74 79 70 |mode and| the typ|
|000039f0| 65 20 6f 66 20 74 68 65 | 20 73 61 6d 70 6c 65 73 |e of the| samples|
|00003a00| 0d 0a 70 6c 61 79 65 64 | 2e 20 54 68 65 20 74 69 |..played|. The ti|
|00003a10| 6d 65 20 75 73 65 64 20 | 64 65 70 65 6e 64 73 20 |me used |depends |
|00003a20| 61 6c 6d 6f 73 74 20 6c | 69 6e 65 61 72 6c 79 20 |almost l|inearly |
|00003a30| 6f 6e 20 74 68 65 20 6d | 69 78 69 6e 67 20 72 61 |on the m|ixing ra|
|00003a40| 74 65 20 61 6e 64 20 74 | 68 65 0d 0a 6e 75 6d 62 |te and t|he..numb|
|00003a50| 65 72 20 6f 66 20 63 68 | 61 6e 6e 65 6c 73 2c 20 |er of ch|annels, |
|00003a60| 61 6e 64 20 73 74 65 72 | 65 6f 20 6f 75 74 70 75 |and ster|eo outpu|
|00003a70| 74 20 63 61 6e 20 74 61 | 6b 65 20 75 70 20 74 6f |t can ta|ke up to|
|00003a80| 20 35 30 5c 25 7b 7d 20 | 6d 6f 72 65 20 43 50 55 | 50\%{} |more CPU|
|00003a90| 20 74 69 6d 65 0d 0a 74 | 68 61 6e 20 6d 6f 6e 6f | time..t|han mono|
|00003aa0| 2e 20 54 68 65 20 73 61 | 6d 70 6c 65 20 74 79 70 |. The sa|mple typ|
|00003ab0| 65 20 65 66 66 65 63 74 | 20 69 73 20 61 6c 6d 6f |e effect| is almo|
|00003ac0| 73 74 20 74 68 65 20 73 | 61 6d 65 20 2d 20 73 74 |st the s|ame - st|
|00003ad0| 65 72 65 6f 20 73 61 6d | 70 6c 65 73 20 63 61 6e |ereo sam|ples can|
|00003ae0| 0d 0a 74 61 6b 65 20 75 | 70 20 74 6f 20 35 30 5c |..take u|p to 50\|
|00003af0| 25 7b 7d 20 6d 6f 72 65 | 20 43 50 55 20 74 68 61 |%{} more| CPU tha|
|00003b00| 6e 20 6d 6f 6e 6f 20 6f | 6e 65 73 2c 20 61 6e 64 |n mono o|nes, and|
|00003b10| 20 31 36 2d 62 69 74 20 | 73 61 6d 70 6c 65 73 20 | 16-bit |samples |
|00003b20| 35 30 5c 25 7b 7d 20 6d | 6f 72 65 0d 0a 74 68 61 |50\%{} m|ore..tha|
|00003b30| 6e 20 38 2d 62 69 74 2e | 0d 0a 0d 0a 54 68 65 20 |n 8-bit.|....The |
|00003b40| 6f 70 70 6f 73 69 74 65 | 20 6f 66 20 73 6f 66 74 |opposite| of soft|
|00003b50| 77 61 72 65 20 6d 69 78 | 69 6e 67 20 69 73 20 68 |ware mix|ing is h|
|00003b60| 61 72 64 77 61 72 65 20 | 6d 69 78 69 6e 67 2e 20 |ardware |mixing. |
|00003b70| 48 61 72 64 77 61 72 65 | 20 6d 69 78 69 6e 67 20 |Hardware| mixing |
|00003b80| 73 6f 75 6e 64 0d 0a 63 | 61 72 64 73 20 61 72 65 |sound..c|ards are|
|00003b90| 20 63 61 70 61 62 6c 65 | 20 6f 66 20 70 6c 61 79 | capable| of play|
|00003ba0| 69 6e 67 20 6d 75 6c 74 | 69 70 6c 65 20 64 69 67 |ing mult|iple dig|
|00003bb0| 69 74 61 6c 20 73 6f 75 | 6e 64 73 20 69 6e 20 68 |ital sou|nds in h|
|00003bc0| 61 72 64 77 61 72 65 2c | 20 61 6e 64 20 74 68 75 |ardware,| and thu|
|00003bd0| 73 0d 0a 74 68 65 72 65 | 20 69 73 20 6e 6f 20 6e |s..there| is no n|
|00003be0| 65 65 64 20 74 6f 20 6d | 69 78 20 74 68 65 20 73 |eed to m|ix the s|
|00003bf0| 6f 75 6e 64 20 69 6e 20 | 73 6f 66 74 77 61 72 65 |ound in |software|
|00003c00| 2e 20 54 68 69 73 20 6f | 66 74 65 6e 20 75 73 65 |. This o|ften use|
|00003c10| 73 20 6d 75 63 68 20 6c | 65 73 73 20 43 50 55 0d |s much l|ess CPU.|
|00003c20| 0a 70 6f 77 65 72 2c 20 | 64 65 70 65 6e 64 69 6e |.power, |dependin|
|00003c30| 67 20 6f 6e 20 74 68 65 | 20 73 6f 75 6e 64 20 63 |g on the| sound c|
|00003c40| 61 72 64 2c 20 62 75 74 | 20 61 73 20 61 20 74 72 |ard, but| as a tr|
|00003c50| 61 64 65 6f 66 66 20 73 | 6f 6d 65 20 66 6c 65 78 |adeoff s|ome flex|
|00003c60| 69 62 69 6c 69 74 79 20 | 69 73 0d 0a 6c 6f 73 74 |ibility |is..lost|
|00003c70| 2e 20 4f 6e 65 20 70 72 | 6f 62 6c 65 6d 20 77 69 |. One pr|oblem wi|
|00003c80| 74 68 20 68 61 72 64 77 | 61 72 65 20 6d 69 78 69 |th hardw|are mixi|
|00003c90| 6e 67 20 63 61 72 64 73 | 20 69 73 2c 20 74 68 61 |ng cards| is, tha|
|00003ca0| 74 20 73 61 6d 70 6c 65 | 73 20 68 61 76 65 20 74 |t sample|s have t|
|00003cb0| 6f 20 62 65 0d 0a 70 6c | 61 63 65 64 20 69 6e 20 |o be..pl|aced in |
|00003cc0| 6f 6e 2d 63 61 72 64 20 | 6d 65 6d 6f 72 79 2e 20 |on-card |memory. |
|00003cd0| 56 65 72 79 20 6f 66 74 | 65 6e 20 74 68 65 20 63 |Very oft|en the c|
|00003ce0| 61 72 64 73 20 63 6f 6d | 65 20 77 69 74 68 20 61 |ards com|e with a|
|00003cf0| 73 20 6c 69 74 74 6c 65 | 20 61 73 20 35 31 32 6b |s little| as 512k|
|00003d00| 62 0d 0a 6f 66 20 6d 65 | 6d 6f 72 79 2c 20 61 6e |b..of me|mory, an|
|00003d10| 64 20 74 68 75 73 20 63 | 61 6e 20 73 74 6f 72 65 |d thus c|an store|
|00003d20| 20 6f 6e 6c 79 20 61 20 | 66 65 77 20 73 61 6d 70 | only a |few samp|
|00003d30| 6c 65 73 2e 20 54 68 65 | 20 73 65 63 6f 6e 64 20 |les. The| second |
|00003d40| 70 72 6f 62 6c 65 6d 20 | 69 73 2c 20 74 68 61 74 |problem |is, that|
|00003d50| 0d 0a 70 6c 61 79 69 6e | 67 20 73 74 72 65 61 6d |..playin|g stream|
|00003d60| 73 20 77 69 74 68 20 68 | 61 72 64 77 61 72 65 20 |s with h|ardware |
|00003d70| 6d 69 78 69 6e 67 20 63 | 61 72 64 73 20 69 73 20 |mixing c|ards is |
|00003d80| 75 73 75 61 6c 6c 79 20 | 69 6d 70 6f 73 73 69 62 |usually |impossib|
|00003d90| 6c 65 2e 20 54 68 69 73 | 0d 0a 73 65 76 65 72 65 |le. This|..severe|
|00003da0| 6c 79 20 6c 69 6d 69 74 | 73 20 74 68 65 20 75 73 |ly limit|s the us|
|00003db0| 61 62 69 6c 69 74 79 20 | 6f 66 20 68 61 72 64 77 |ability |of hardw|
|00003dc0| 61 72 65 20 6d 69 78 69 | 6e 67 20 63 61 72 64 73 |are mixi|ng cards|
|00003dd0| 20 77 69 74 68 20 4d 49 | 44 41 53 2e 0d 0a 0d 0a | with MI|DAS.....|
|00003de0| 0d 0a 0d 0a 0d 0a 0d 0a | 0d 0a 0d 0a 5c 63 68 61 |........|....\cha|
|00003df0| 70 74 65 72 7b 54 68 65 | 20 73 79 73 74 65 6d 7d |pter{The| system}|
|00003e00| 0d 0a 0d 0a 54 68 69 73 | 20 63 68 61 70 74 65 72 |....This| chapter|
|00003e10| 20 67 69 76 65 73 20 61 | 6e 20 6f 76 65 72 76 69 | gives a|n overvi|
|00003e20| 65 77 20 6f 6e 20 68 6f | 77 20 4d 49 44 41 53 20 |ew on ho|w MIDAS |
|00003e30| 53 6f 75 6e 64 20 53 79 | 73 74 65 6d 20 69 73 20 |Sound Sy|stem is |
|00003e40| 61 63 74 75 61 6c 6c 79 | 20 62 75 69 6c 74 2e 0d |actually| built..|
|00003e50| 0a 49 74 20 67 69 76 65 | 73 20 64 65 73 63 72 69 |.It give|s descri|
|00003e60| 70 74 69 6f 6e 73 20 6f | 6e 20 61 6c 6c 20 6d 61 |ptions o|n all ma|
|00003e70| 69 6e 20 73 79 73 74 65 | 6d 20 6d 6f 64 75 6c 65 |in syste|m module|
|00003e80| 73 2c 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 6f |s, infor|mation o|
|00003e90| 6e 20 68 6f 77 20 74 68 | 65 79 20 75 73 65 0d 0a |n how th|ey use..|
|00003ea0| 65 61 63 68 20 6f 74 68 | 65 72 2c 20 61 6e 64 20 |each oth|er, and |
|00003eb0| 77 68 61 74 20 74 68 65 | 69 72 20 6d 6f 73 74 20 |what the|ir most |
|00003ec0| 69 6d 70 6f 72 74 61 6e | 74 20 63 68 61 72 61 63 |importan|t charac|
|00003ed0| 74 65 72 69 73 74 69 63 | 73 20 61 72 65 2e 20 54 |teristic|s are. T|
|00003ee0| 68 69 73 0d 0a 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |his..inf|ormation|
|00003ef0| 20 6d 61 69 6e 6c 79 20 | 61 70 70 6c 69 65 73 20 | mainly |applies |
|00003f00| 66 6f 72 20 4d 49 44 41 | 53 20 75 73 61 67 65 20 |for MIDA|S usage |
|00003f10| 62 65 6c 6f 77 20 74 68 | 65 20 41 50 49 20 6c 65 |below th|e API le|
|00003f20| 76 65 6c 2c 20 61 6e 64 | 20 6d 6f 73 74 0d 0a 75 |vel, and| most..u|
|00003f30| 73 65 72 73 20 64 6f 20 | 6e 6f 74 20 6e 65 65 64 |sers do |not need|
|00003f40| 20 74 6f 20 62 65 20 66 | 61 6d 69 6c 69 61 72 20 | to be f|amiliar |
|00003f50| 77 69 74 68 20 74 68 69 | 73 20 69 6e 66 6f 72 6d |with thi|s inform|
|00003f60| 61 74 69 6f 6e 2e 0d 0a | 0d 0a 0d 0a 5c 73 65 63 |ation...|....\sec|
|00003f70| 74 69 6f 6e 7b 4f 76 65 | 72 76 69 65 77 20 6f 66 |tion{Ove|rview of|
|00003f80| 20 73 79 73 74 65 6d 20 | 61 72 63 68 69 74 65 63 | system |architec|
|00003f90| 68 74 75 72 65 7d 0d 0a | 0d 0a 5b 54 42 44 3a 20 |hture}..|..[TBD: |
|00003fa0| 70 69 63 74 75 72 65 21 | 5d 0d 0a 0d 0a 0d 0a 5c |picture!|]......\|
|00003fb0| 73 65 63 74 69 6f 6e 7b | 44 65 73 63 72 69 70 74 |section{|Descript|
|00003fc0| 69 6f 6e 20 6f 66 20 61 | 6c 6c 20 6d 6f 64 75 6c |ion of a|ll modul|
|00003fd0| 65 73 7d 0d 0a 0d 0a 5c | 73 75 62 73 65 63 74 69 |es}....\|subsecti|
|00003fe0| 6f 6e 7b 53 6f 75 6e 64 | 20 44 65 76 69 63 65 73 |on{Sound| Devices|
|00003ff0| 7d 0d 0a 0d 0a 53 6f 75 | 6e 64 20 44 65 76 69 63 |}....Sou|nd Devic|
|00004000| 65 73 20 61 72 65 20 61 | 74 20 74 68 65 20 76 65 |es are a|t the ve|
|00004010| 72 79 20 68 65 61 72 74 | 20 6f 66 20 4d 49 44 41 |ry heart| of MIDA|
|00004020| 53 2e 20 54 68 65 79 20 | 70 72 6f 76 69 64 65 20 |S. They |provide |
|00004030| 74 68 65 20 62 61 73 69 | 63 0d 0a 66 75 6e 63 74 |the basi|c..funct|
|00004040| 69 6f 6e 61 6c 69 74 79 | 20 66 6f 72 20 70 6c 61 |ionality| for pla|
|00004050| 79 69 6e 67 20 61 75 64 | 69 6f 2c 20 74 68 65 79 |ying aud|io, they|
|00004060| 20 6d 61 6e 61 67 65 20 | 74 68 65 20 73 61 6d 70 | manage |the samp|
|00004070| 6c 65 73 20 6c 6f 61 64 | 65 64 20 69 6e 20 74 68 |les load|ed in th|
|00004080| 65 0d 0a 73 79 73 74 65 | 6d 2c 20 61 6e 64 20 70 |e..syste|m, and p|
|00004090| 72 6f 76 69 64 65 20 61 | 20 63 6f 6d 6d 6f 6e 20 |rovide a| common |
|000040a0| 70 72 6f 67 72 61 6d 6d | 69 6e 67 20 69 6e 74 65 |programm|ing inte|
|000040b0| 72 66 61 63 65 20 66 6f | 72 20 61 6c 6c 20 73 75 |rface fo|r all su|
|000040c0| 70 70 6f 72 74 65 64 20 | 73 6f 75 6e 64 0d 0a 68 |pported |sound..h|
|000040d0| 61 72 64 77 61 72 65 2e | 20 4e 6f 72 6d 61 6c 6c |ardware.| Normall|
|000040e0| 79 20 61 20 75 73 65 72 | 20 64 6f 65 73 20 6e 6f |y a user| does no|
|000040f0| 74 20 75 73 65 20 74 68 | 65 20 53 6f 75 6e 64 20 |t use th|e Sound |
|00004100| 44 65 76 69 63 65 73 20 | 64 69 72 65 63 74 6c 79 |Devices |directly|
|00004110| 2c 20 62 75 74 20 72 61 | 74 68 65 72 0d 0a 75 73 |, but ra|ther..us|
|00004120| 65 73 20 4d 49 44 41 53 | 20 75 70 70 65 72 20 6c |es MIDAS| upper l|
|00004130| 65 76 65 6c 20 70 72 6f | 67 72 61 6d 6d 69 6e 67 |evel pro|gramming|
|00004140| 20 69 6e 74 65 72 66 61 | 63 65 73 20 61 6e 64 20 | interfa|ces and |
|00004150| 6c 69 62 72 61 72 69 65 | 73 20 74 6f 20 70 6c 61 |librarie|s to pla|
|00004160| 79 20 73 6f 75 6e 64 2e | 0d 0a 48 6f 77 65 76 65 |y sound.|..Howeve|
|00004170| 72 2c 20 69 6e 74 65 72 | 6e 61 6c 6c 79 20 4d 49 |r, inter|nally MI|
|00004180| 44 41 53 20 69 73 20 76 | 65 72 79 20 6d 75 63 68 |DAS is v|ery much|
|00004190| 20 63 65 6e 74 65 72 65 | 64 20 61 72 6f 75 6e 64 | centere|d around|
|000041a0| 20 53 6f 75 6e 64 20 44 | 65 76 69 63 65 73 2c 20 | Sound D|evices, |
|000041b0| 61 6e 64 0d 0a 61 6e 79 | 6f 6e 65 20 64 6f 69 6e |and..any|one doin|
|000041c0| 67 20 61 6e 79 20 6c 6f | 77 65 72 2d 6c 65 76 65 |g any lo|wer-leve|
|000041d0| 6c 20 4d 49 44 41 53 20 | 70 72 6f 67 72 61 6d 6d |l MIDAS |programm|
|000041e0| 69 6e 67 20 6f 72 20 6a | 75 73 74 20 65 78 61 6d |ing or j|ust exam|
|000041f0| 69 6e 69 6e 67 20 74 68 | 65 20 73 79 73 74 65 6d |ining th|e system|
|00004200| 0d 0a 73 6f 75 72 63 65 | 20 63 6f 64 65 20 63 61 |..source| code ca|
|00004210| 6e 27 74 20 61 76 6f 69 | 64 20 77 6f 72 6b 69 6e |n't avoi|d workin|
|00004220| 67 20 77 69 74 68 20 74 | 68 65 6d 2e 0d 0a 0d 0a |g with t|hem.....|
|00004230| 41 20 73 69 6e 67 6c 65 | 20 53 6f 75 6e 64 20 44 |A single| Sound D|
|00004240| 65 76 69 63 65 20 63 61 | 6e 20 63 6f 6e 74 61 69 |evice ca|n contai|
|00004250| 6e 20 69 6e 66 6f 72 6d | 61 74 69 6f 6e 20 66 6f |n inform|ation fo|
|00004260| 72 20 6f 6e 65 20 6f 72 | 20 6d 6f 72 65 20 73 6f |r one or| more so|
|00004270| 75 6e 64 20 63 61 72 64 | 2e 20 49 6e 0d 0a 74 68 |und card|. In..th|
|00004280| 61 74 20 63 61 73 65 20 | 74 68 65 20 63 61 72 64 |at case |the card|
|00004290| 73 20 61 72 65 20 75 73 | 75 61 6c 6c 79 20 64 69 |s are us|ually di|
|000042a0| 66 66 65 72 65 6e 74 20 | 6d 6f 64 65 6c 73 20 6f |fferent |models o|
|000042b0| 66 20 74 68 65 20 73 61 | 6d 65 20 73 6f 75 6e 64 |f the sa|me sound|
|000042c0| 20 63 61 72 64 20 2d 20 | 66 6f 72 0d 0a 65 78 61 | card - |for..exa|
|000042d0| 6d 70 6c 65 2c 20 74 68 | 65 20 53 6f 75 6e 64 20 |mple, th|e Sound |
|000042e0| 42 6c 61 73 74 65 72 20 | 73 65 72 69 65 73 20 53 |Blaster |series S|
|000042f0| 6f 75 6e 64 20 44 65 76 | 69 63 65 20 69 6e 63 6c |ound Dev|ice incl|
|00004300| 75 64 65 73 20 66 69 76 | 65 20 64 69 66 66 65 72 |udes fiv|e differ|
|00004310| 65 6e 74 20 73 6f 75 6e | 64 0d 0a 63 61 72 64 20 |ent soun|d..card |
|00004320| 74 79 70 65 73 3a 20 53 | 6f 75 6e 64 20 42 6c 61 |types: S|ound Bla|
|00004330| 73 74 65 72 20 31 2e 30 | 2c 20 31 2e 35 2c 20 32 |ster 1.0|, 1.5, 2|
|00004340| 2e 30 2c 20 50 72 6f 20 | 61 6e 64 20 31 36 2e 0d |.0, Pro |and 16..|
|00004350| 0a 0d 0a 49 6e 74 65 72 | 6e 61 6c 6c 79 2c 20 61 |...Inter|nally, a|
|00004360| 20 53 6f 75 6e 64 20 44 | 65 76 69 63 65 20 69 73 | Sound D|evice is|
|00004370| 20 72 65 70 72 65 73 65 | 6e 74 65 64 20 62 79 20 | represe|nted by |
|00004380| 6f 6e 65 20 6c 61 72 67 | 65 20 64 61 74 61 20 73 |one larg|e data s|
|00004390| 74 72 75 63 74 75 72 65 | 2e 20 54 68 65 0d 0a 73 |tructure|. The..s|
|000043a0| 74 72 75 63 74 75 72 65 | 20 63 6f 6e 74 61 69 6e |tructure| contain|
|000043b0| 73 20 61 20 73 65 74 20 | 6f 66 20 76 61 72 69 61 |s a set |of varia|
|000043c0| 62 6c 65 73 20 66 6f 72 | 20 63 6f 6e 66 69 67 75 |bles for| configu|
|000043d0| 72 69 6e 67 20 74 68 65 | 20 53 6f 75 6e 64 20 44 |ring the| Sound D|
|000043e0| 65 76 69 63 65 2c 20 70 | 6c 75 73 0d 0a 61 20 6e |evice, p|lus..a n|
|000043f0| 75 6d 62 65 72 20 6f 66 | 20 66 75 6e 63 74 69 6f |umber of| functio|
|00004400| 6e 20 70 6f 69 6e 74 65 | 72 73 2e 20 54 68 65 73 |n pointe|rs. Thes|
|00004410| 65 20 66 75 6e 63 74 69 | 6f 6e 20 70 6f 69 6e 74 |e functi|on point|
|00004420| 65 72 73 20 61 72 65 20 | 74 68 65 6e 20 75 73 65 |ers are |then use|
|00004430| 64 20 74 6f 0d 0a 63 61 | 6c 6c 20 74 68 65 20 53 |d to..ca|ll the S|
|00004440| 6f 75 6e 64 20 44 65 76 | 69 63 65 20 66 75 6e 63 |ound Dev|ice func|
|00004450| 74 69 6f 6e 73 2e 20 54 | 68 69 73 20 65 6e 73 75 |tions. T|his ensu|
|00004460| 72 65 73 20 74 68 61 74 | 20 61 6e 79 20 63 6f 64 |res that| any cod|
|00004470| 65 20 77 6f 72 6b 69 6e | 67 20 77 69 74 68 0d 0a |e workin|g with..|
|00004480| 4d 49 44 41 53 20 53 6f | 75 6e 64 20 44 65 76 69 |MIDAS So|und Devi|
|00004490| 63 65 73 20 6f 6e 6c 79 | 20 68 61 73 20 74 6f 20 |ces only| has to |
|000044a0| 6d 61 69 6e 74 61 69 6e | 20 61 20 70 6f 69 6e 74 |maintain| a point|
|000044b0| 65 72 20 74 6f 20 74 68 | 65 20 63 75 72 72 65 6e |er to th|e curren|
|000044c0| 74 20 53 6f 75 6e 64 0d | 0a 44 65 76 69 63 65 20 |t Sound.|.Device |
|000044d0| 73 74 72 75 63 74 75 72 | 65 20 69 6e 20 75 73 65 |structur|e in use|
|000044e0| 2c 20 61 6e 64 20 63 61 | 6e 20 75 73 65 20 61 6e |, and ca|n use an|
|000044f0| 79 20 73 75 70 70 6f 72 | 74 65 64 20 53 6f 75 6e |y suppor|ted Soun|
|00004500| 64 20 44 65 76 69 63 65 | 20 77 69 74 68 6f 75 74 |d Device| without|
|00004510| 20 63 6f 64 65 0d 0a 6d | 6f 64 69 66 69 63 61 74 | code..m|odificat|
|00004520| 69 6f 6e 2e 0d 0a 0d 0a | 0d 0a 5c 73 75 62 73 65 |ion.....|..\subse|
|00004530| 63 74 69 6f 6e 7b 47 65 | 6e 65 72 69 63 20 4d 6f |ction{Ge|neric Mo|
|00004540| 64 75 6c 65 20 50 6c 61 | 79 65 72 7d 0d 0a 0d 0a |dule Pla|yer}....|
|00004550| 47 65 6e 65 72 69 63 20 | 4d 6f 64 75 6c 65 20 50 |Generic |Module P|
|00004560| 6c 61 79 65 72 2c 20 6f | 72 20 47 4d 50 6c 61 79 |layer, o|r GMPlay|
|00004570| 65 72 20 66 6f 72 20 73 | 68 6f 72 74 2c 20 74 61 |er for s|hort, ta|
|00004580| 6b 65 73 20 63 61 72 65 | 20 6f 66 20 61 6c 6c 20 |kes care| of all |
|00004590| 6d 6f 64 75 6c 65 0d 0a | 70 6c 61 79 69 6e 67 20 |module..|playing |
|000045a0| 69 6e 20 4d 49 44 41 53 | 2e 20 4d 6f 64 75 6c 65 |in MIDAS|. Module|
|000045b0| 73 20 69 6e 20 64 69 66 | 66 65 72 65 6e 74 20 66 |s in dif|ferent f|
|000045c0| 6f 72 6d 61 74 73 20 61 | 72 65 20 63 6f 6e 76 65 |ormats a|re conve|
|000045d0| 72 74 65 64 20 74 6f 20 | 47 4d 50 6c 61 79 65 72 |rted to |GMPlayer|
|000045e0| 0d 0a 69 6e 74 65 72 6e | 61 6c 20 7b 5c 65 6d 20 |..intern|al {\em |
|000045f0| 67 6d 70 4d 6f 64 75 6c | 65 7d 20 20 20 20 20 20 |gmpModul|e} |
|00004600| 20 20 25 20 54 4f 44 4f | 20 2d 20 6c 69 6e 6b 0d | % TODO| - link.|
|00004610| 0a 73 74 72 75 63 74 75 | 72 65 20 66 6f 72 6d 61 |.structu|re forma|
|00004620| 74 20 77 68 65 6e 20 6c | 6f 61 64 65 64 20 74 6f |t when l|oaded to|
|00004630| 20 6d 65 6d 6f 72 79 2c | 0d 0a 73 6f 20 74 68 61 | memory,|..so tha|
|00004640| 74 20 61 20 73 69 6e 67 | 6c 65 20 6d 6f 64 75 6c |t a sing|le modul|
|00004650| 65 20 70 6c 61 79 65 72 | 20 63 61 6e 20 68 61 6e |e player| can han|
|00004660| 64 6c 65 20 61 6c 6c 20 | 66 6f 72 6d 61 74 73 2e |dle all |formats.|
|00004670| 20 54 6f 20 6d 61 69 6e | 74 61 69 6e 20 62 65 73 | To main|tain bes|
|00004680| 74 0d 0a 70 6f 73 73 69 | 62 6c 65 20 63 6f 6d 70 |t..possi|ble comp|
|00004690| 61 74 69 62 69 6c 69 74 | 79 20 77 69 74 68 20 61 |atibilit|y with a|
|000046a0| 6c 6c 20 74 72 61 63 6b | 65 72 73 2c 20 68 6f 77 |ll track|ers, how|
|000046b0| 65 76 65 72 2c 20 47 4d | 50 6c 61 79 65 72 20 69 |ever, GM|Player i|
|000046c0| 6d 70 6c 65 6d 65 6e 74 | 73 20 73 6f 6d 65 0d 0a |mplement|s some..|
|000046d0| 63 6f 6d 6d 61 6e 64 73 | 20 61 6e 64 20 66 65 61 |commands| and fea|
|000046e0| 74 75 72 65 73 20 64 69 | 66 66 65 72 65 6e 74 6c |tures di|fferentl|
|000046f0| 79 20 64 65 70 65 6e 64 | 69 6e 67 20 6f 6e 20 74 |y depend|ing on t|
|00004700| 68 65 20 6f 72 69 67 69 | 6e 61 6c 20 6d 6f 64 75 |he origi|nal modu|
|00004710| 6c 65 20 66 6f 72 6d 61 | 74 2e 0d 0a 54 68 69 73 |le forma|t...This|
|00004720| 20 65 6e 73 75 72 65 73 | 20 74 68 61 74 20 70 6c | ensures| that pl|
|00004730| 61 79 62 61 63 6b 20 71 | 75 61 6c 69 74 79 20 69 |ayback q|uality i|
|00004740| 73 20 6e 6f 74 20 63 6f | 6d 70 72 6f 6d 69 73 65 |s not co|mpromise|
|00004750| 64 2e 0d 0a 0d 0a 47 4d | 50 6c 61 79 65 72 20 69 |d.....GM|Player i|
|00004760| 73 20 6e 6f 74 20 6c 69 | 6d 69 74 65 64 20 66 6f |s not li|mited fo|
|00004770| 72 20 70 6c 61 79 69 6e | 67 20 61 20 73 69 6e 67 |r playin|g a sing|
|00004780| 6c 65 20 6d 6f 64 75 6c | 65 20 6f 6e 6c 79 2c 20 |le modul|e only, |
|00004790| 69 6e 20 66 61 63 74 20 | 69 74 20 63 61 6e 20 62 |in fact |it can b|
|000047a0| 65 0d 0a 75 73 65 64 20 | 74 6f 20 70 6c 61 79 20 |e..used |to play |
|000047b0| 61 6e 20 75 6e 6c 69 6d | 69 74 65 64 20 6e 75 6d |an unlim|ited num|
|000047c0| 62 65 72 20 6f 66 20 73 | 6f 6e 67 73 20 73 69 6d |ber of s|ongs sim|
|000047d0| 75 6c 74 61 6e 65 6f 75 | 73 6c 79 2e 20 54 68 69 |ultaneou|sly. Thi|
|000047e0| 73 20 77 61 79 20 73 6f | 75 6e 64 0d 0a 65 66 66 |s way so|und..eff|
|000047f0| 65 63 74 73 20 63 61 6e | 20 62 65 20 63 6f 6d 70 |ects can| be comp|
|00004800| 6f 73 65 64 20 61 73 20 | 73 6d 61 6c 6c 20 73 6f |osed as |small so|
|00004810| 6e 67 20 66 72 61 67 6d | 65 6e 74 73 2c 20 74 6f |ng fragm|ents, to|
|00004820| 20 65 6c 69 6d 69 6e 61 | 74 65 20 74 68 65 20 6e | elimina|te the n|
|00004830| 65 65 64 20 66 6f 72 0d | 0a 6c 6f 6e 67 20 73 61 |eed for.|.long sa|
|00004840| 6d 70 6c 65 73 2e 0d 0a | 0d 0a 47 4d 50 6c 61 79 |mples...|..GMPlay|
|00004850| 65 72 20 69 73 20 6e 6f | 74 20 64 65 70 65 6e 64 |er is no|t depend|
|00004860| 65 6e 74 20 6f 6e 20 74 | 68 65 20 75 6e 64 65 72 |ent on t|he under|
|00004870| 6c 79 69 6e 67 20 73 6f | 75 6e 64 20 68 61 72 64 |lying so|und hard|
|00004880| 77 61 72 65 20 2d 2d 2d | 20 69 74 20 6f 70 65 72 |ware ---| it oper|
|00004890| 61 74 65 73 20 61 73 0d | 0a 65 61 73 69 6c 79 20 |ates as.|.easily |
|000048a0| 77 69 74 68 20 6e 6f 20 | 73 6f 75 6e 64 20 6f 75 |with no |sound ou|
|000048b0| 74 70 75 74 20 61 74 20 | 61 6c 6c 20 61 73 20 69 |tput at |all as i|
|000048c0| 74 20 64 6f 65 73 20 77 | 69 74 68 20 61 6e 20 61 |t does w|ith an a|
|000048d0| 64 76 61 6e 63 65 64 20 | 77 61 76 65 74 61 62 6c |dvanced |wavetabl|
|000048e0| 65 0d 0a 73 6f 75 6e 64 | 20 63 61 72 64 2e 20 41 |e..sound| card. A|
|000048f0| 74 20 69 6e 69 74 69 61 | 6c 69 7a 61 74 69 6f 6e |t initia|lization|
|00004900| 20 70 68 61 73 65 2c 20 | 47 4d 50 6c 61 79 65 72 | phase, |GMPlayer|
|00004910| 20 69 73 20 70 61 73 73 | 65 64 20 61 20 70 6f 69 | is pass|ed a poi|
|00004920| 6e 74 65 72 20 74 6f 20 | 74 68 65 0d 0a 53 6f 75 |nter to |the..Sou|
|00004930| 6e 64 20 44 65 76 69 63 | 65 20 74 68 61 74 20 73 |nd Devic|e that s|
|00004940| 68 6f 75 6c 64 20 62 65 | 20 75 73 65 64 20 66 6f |hould be| used fo|
|00004950| 72 20 6d 75 73 69 63 20 | 70 6c 61 79 62 61 63 6b |r music |playback|
|00004960| 2c 20 61 6e 64 20 61 66 | 74 65 72 77 61 72 64 73 |, and af|terwards|
|00004970| 20 69 74 0d 0a 64 69 72 | 65 63 74 73 20 61 6c 6c | it..dir|ects all|
|00004980| 20 73 6f 75 6e 64 73 20 | 74 6f 20 74 68 61 74 20 | sounds |to that |
|00004990| 53 6f 75 6e 64 20 44 65 | 76 69 63 65 2e 0d 0a 0d |Sound De|vice....|
|000049a0| 0a 0d 0a 5c 73 75 62 73 | 65 63 74 69 6f 6e 7b 4d |...\subs|ection{M|
|000049b0| 49 44 41 53 20 6b 65 72 | 6e 65 6c 7d 0d 0a 0d 0a |IDAS ker|nel}....|
|000049c0| 54 68 65 20 4d 49 44 41 | 53 20 22 6b 65 72 6e 65 |The MIDA|S "kerne|
|000049d0| 6c 22 20 63 6f 6e 73 69 | 73 74 73 20 6f 66 20 73 |l" consi|sts of s|
|000049e0| 6d 61 6c 6c 65 72 20 6d | 6f 64 75 6c 65 73 20 75 |maller m|odules u|
|000049f0| 73 65 64 20 62 79 20 61 | 6c 6c 20 73 79 73 74 65 |sed by a|ll syste|
|00004a00| 6d 20 63 6f 6d 70 6f 6e | 65 6e 74 73 2e 0d 0a 54 |m compon|ents...T|
|00004a10| 68 69 73 20 69 6e 63 6c | 75 64 65 73 20 25 54 4f |his incl|udes %TO|
|00004a20| 44 4f 3a 6c 69 6e 6b 73 | 0d 0a 6d 65 6d 6f 72 79 |DO:links|..memory|
|00004a30| 20 6d 61 6e 61 67 65 6d | 65 6e 74 20 66 75 6e 63 | managem|ent func|
|00004a40| 74 69 6f 6e 73 2c 20 65 | 72 72 6f 72 20 68 61 6e |tions, e|rror han|
|00004a50| 64 6c 69 6e 67 20 72 6f | 75 74 69 6e 65 73 2c 20 |dling ro|utines, |
|00004a60| 66 69 6c 65 20 6d 61 6e | 61 67 65 6d 65 6e 74 0d |file man|agement.|
|00004a70| 0a 66 75 6e 63 74 69 6f | 6e 73 20 61 6e 64 20 63 |.functio|ns and c|
|00004a80| 6f 6d 6d 6f 6e 20 75 74 | 69 6c 69 74 79 20 66 75 |ommon ut|ility fu|
|00004a90| 6e 63 74 69 6f 6e 73 2e | 20 54 68 65 73 65 20 6b |nctions.| These k|
|00004aa0| 65 72 6e 65 6c 20 66 75 | 6e 63 74 69 6f 6e 73 20 |ernel fu|nctions |
|00004ab0| 65 6e 73 75 72 65 20 74 | 68 61 74 0d 0a 4d 49 44 |ensure t|hat..MID|
|00004ac0| 41 53 20 64 6f 65 73 20 | 6e 6f 74 20 64 65 70 65 |AS does |not depe|
|00004ad0| 6e 64 20 6f 6e 20 74 68 | 65 20 75 6e 64 65 72 6c |nd on th|e underl|
|00004ae0| 79 69 6e 67 20 6f 70 65 | 72 61 74 69 6e 67 20 73 |ying ope|rating s|
|00004af0| 79 73 74 65 6d 20 61 6e | 79 20 43 20 72 75 6e 74 |ystem an|y C runt|
|00004b00| 69 6d 65 0d 0a 6c 69 62 | 72 61 72 69 65 73 20 2d |ime..lib|raries -|
|00004b10| 2d 2d 20 61 6c 6c 20 64 | 65 70 65 6e 64 65 6e 63 |-- all d|ependenc|
|00004b20| 69 65 73 20 61 72 65 20 | 65 6e 63 61 70 73 75 6c |ies are |encapsul|
|00004b30| 61 74 65 64 20 69 6e 20 | 73 69 6e 67 6c 65 20 6d |ated in |single m|
|00004b40| 6f 64 75 6c 65 73 2e 0d | 0a 0d 0a 0d 0a 0d 0a 5c |odules..|.......\|
|00004b50| 73 65 63 74 69 6f 6e 7b | 43 61 6c 6c 69 6e 67 20 |section{|Calling |
|00004b60| 63 6f 6e 76 65 6e 74 69 | 6f 6e 73 7d 0d 0a 0d 0a |conventi|ons}....|
|00004b70| 41 6c 6c 20 69 6e 74 65 | 72 6e 61 6c 20 4d 49 44 |All inte|rnal MID|
|00004b80| 41 53 20 53 6f 75 6e 64 | 20 53 79 73 74 65 6d 20 |AS Sound| System |
|00004b90| 66 75 6e 63 74 69 6f 6e | 73 20 75 73 65 20 74 68 |function|s use th|
|00004ba0| 65 20 73 61 6d 65 20 63 | 61 6c 6c 69 6e 67 20 63 |e same c|alling c|
|00004bb0| 6f 6e 76 65 6e 74 69 6f | 6e 73 20 61 6e 64 0d 0a |onventio|ns and..|
|00004bc0| 61 20 73 69 6d 69 6c 61 | 72 20 6d 65 74 68 6f 64 |a simila|r method|
|00004bd0| 20 66 6f 72 20 72 65 74 | 75 72 6e 69 6e 67 20 64 | for ret|urning d|
|00004be0| 61 74 61 2e 20 54 68 69 | 73 20 73 69 6d 70 6c 69 |ata. Thi|s simpli|
|00004bf0| 66 69 65 73 20 70 72 6f | 67 72 61 6d 6d 69 6e 67 |fies pro|gramming|
|00004c00| 2c 20 61 73 20 61 6c 6c | 0d 0a 66 75 6e 63 74 69 |, as all|..functi|
|00004c10| 6f 6e 73 20 62 65 68 61 | 76 65 20 63 6f 6e 73 69 |ons beha|ve consi|
|00004c20| 73 74 65 6e 74 6c 79 2c | 20 61 6e 64 20 65 6e 73 |stently,| and ens|
|00004c30| 75 72 65 73 20 74 68 61 | 74 20 65 72 72 6f 72 20 |ures tha|t error |
|00004c40| 63 6f 64 65 73 20 67 65 | 74 20 68 61 6e 64 6c 65 |codes ge|t handle|
|00004c50| 64 0d 0a 70 72 6f 70 65 | 72 6c 79 2e 0d 0a 0d 0a |d..prope|rly.....|
|00004c60| 5c 73 75 62 73 65 63 74 | 69 6f 6e 7b 45 72 72 6f |\subsect|ion{Erro|
|00004c70| 72 20 63 6f 64 65 73 7d | 0d 0a 0d 0a 41 6c 6c 20 |r codes}|....All |
|00004c80| 66 75 6e 63 74 69 6f 6e | 73 20 69 6e 20 4d 49 44 |function|s in MID|
|00004c90| 41 53 20 53 6f 75 6e 64 | 20 53 79 73 74 65 6d 20 |AS Sound| System |
|00004ca0| 72 65 74 75 72 6e 20 61 | 6e 20 65 72 72 6f 72 20 |return a|n error |
|00004cb0| 63 6f 64 65 2e 20 54 68 | 65 72 65 20 69 73 20 6e |code. Th|ere is n|
|00004cc0| 6f 0d 0a 65 78 63 65 70 | 74 69 6f 6e 20 74 6f 20 |o..excep|tion to |
|00004cd0| 74 68 69 73 2c 20 61 6e | 64 20 61 6c 6c 20 6f 74 |this, an|d all ot|
|00004ce0| 68 65 72 20 64 61 74 61 | 20 69 73 20 72 65 74 75 |her data| is retu|
|00004cf0| 72 6e 65 64 20 75 73 69 | 6e 67 20 70 6f 69 6e 74 |rned usi|ng point|
|00004d00| 65 72 73 20 28 73 65 65 | 20 62 65 6c 6f 77 29 2e |ers (see| below).|
|00004d10| 0d 0a 54 68 69 73 20 73 | 69 6d 70 6c 69 66 69 65 |..This s|implifie|
|00004d20| 73 20 65 72 72 6f 72 20 | 68 61 6e 64 6c 69 6e 67 |s error |handling|
|00004d30| 2c 20 61 6e 64 20 6d 61 | 6b 65 73 20 73 75 72 65 |, and ma|kes sure|
|00004d40| 20 65 72 72 6f 72 20 63 | 6f 64 65 73 20 61 6c 77 | error c|odes alw|
|00004d50| 61 79 73 20 67 65 74 20 | 68 61 6e 64 6c 65 64 0d |ays get |handled.|
|00004d60| 0a 70 72 6f 70 65 72 6c | 79 2e 20 49 6e 20 61 64 |.properl|y. In ad|
|00004d70| 64 69 74 69 6f 6e 2c 20 | 77 68 65 6e 20 4d 49 44 |dition, |when MID|
|00004d80| 41 53 20 69 73 20 63 6f | 6d 70 69 6c 65 64 20 77 |AS is co|mpiled w|
|00004d90| 69 74 68 20 44 45 42 55 | 47 20 6d 6f 64 65 20 6f |ith DEBU|G mode o|
|00004da0| 6e 2c 20 74 68 65 20 65 | 72 72 6f 72 0d 0a 68 61 |n, the e|rror..ha|
|00004db0| 6e 64 6c 69 6e 67 20 66 | 75 6e 63 74 69 6f 6e 73 |ndling f|unctions|
|00004dc0| 20 63 61 6e 20 73 75 70 | 70 6c 79 20 64 65 74 61 | can sup|ply deta|
|00004dd0| 69 6c 65 64 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |iled inf|ormation|
|00004de0| 20 61 62 6f 75 74 20 74 | 68 65 20 65 72 72 6f 72 | about t|he error|
|00004df0| 73 20 74 68 61 74 0d 0a | 68 61 70 70 65 6e 65 64 |s that..|happened|
|00004e00| 2c 20 73 75 63 68 20 61 | 73 20 77 68 69 63 68 20 |, such a|s which |
|00004e10| 66 75 6e 63 74 69 6f 6e | 20 6f 72 69 67 69 6e 61 |function| origina|
|00004e20| 6c 6c 79 20 63 61 75 73 | 65 64 20 74 68 65 20 65 |lly caus|ed the e|
|00004e30| 72 72 6f 72 20 61 6e 64 | 20 77 68 61 74 0d 0a 66 |rror and| what..f|
|00004e40| 75 6e 63 74 69 6f 6e 73 | 20 63 61 6c 6c 65 64 20 |unctions| called |
|00004e50| 69 74 2e 0d 0a 0d 0a 5c | 73 75 62 73 65 63 74 69 |it.....\|subsecti|
|00004e60| 6f 6e 7b 52 65 74 75 72 | 6e 69 6e 67 20 64 61 74 |on{Retur|ning dat|
|00004e70| 61 7d 0d 0a 0d 0a 41 73 | 20 74 68 65 20 72 65 74 |a}....As| the ret|
|00004e80| 75 72 6e 20 76 61 6c 75 | 65 20 6f 66 20 74 68 65 |urn valu|e of the|
|00004e90| 20 66 75 6e 63 74 69 6f | 6e 20 69 73 20 61 6c 77 | functio|n is alw|
|00004ea0| 61 79 73 20 72 65 73 65 | 72 76 65 64 20 66 6f 72 |ays rese|rved for|
|00004eb0| 20 74 68 65 20 65 72 72 | 6f 72 20 63 6f 64 65 2c | the err|or code,|
|00004ec0| 0d 0a 61 6c 6c 20 6f 74 | 68 65 72 20 64 61 74 61 |..all ot|her data|
|00004ed0| 20 77 69 6c 6c 20 6e 65 | 65 64 20 74 6f 20 62 65 | will ne|ed to be|
|00004ee0| 20 72 65 74 75 72 6e 65 | 64 20 62 79 20 75 73 69 | returne|d by usi|
|00004ef0| 6e 67 20 70 6f 69 6e 74 | 65 72 73 2e 20 41 6c 6c |ng point|ers. All|
|00004f00| 20 4d 49 44 41 53 0d 0a | 66 75 6e 63 74 69 6f 6e | MIDAS..|function|
|00004f10| 73 20 74 68 61 74 20 72 | 65 74 75 72 6e 20 64 61 |s that r|eturn da|
|00004f20| 74 61 20 77 69 6c 6c 20 | 61 63 63 65 70 74 20 61 |ta will |accept a|
|00004f30| 73 20 74 68 65 69 72 20 | 6c 61 73 74 20 61 72 67 |s their |last arg|
|00004f40| 75 6d 65 6e 74 73 20 70 | 6f 69 6e 74 65 72 73 20 |uments p|ointers |
|00004f50| 74 6f 0d 0a 74 68 65 20 | 76 61 72 69 61 62 6c 65 |to..the |variable|
|00004f60| 73 20 74 68 61 74 20 77 | 69 6c 6c 20 68 6f 6c 64 |s that w|ill hold|
|00004f70| 20 74 68 65 20 72 65 74 | 75 72 6e 20 76 61 6c 75 | the ret|urn valu|
|00004f80| 65 73 2e 20 4d 61 6b 65 | 20 73 75 72 65 20 79 6f |es. Make| sure yo|
|00004f90| 75 20 7b 5c 62 66 20 61 | 6c 77 61 79 73 7d 0d 0a |u {\bf a|lways}..|
|00004fa0| 70 61 73 73 20 74 68 65 | 73 65 20 66 75 6e 63 74 |pass the|se funct|
|00004fb0| 69 6f 6e 73 20 6c 65 67 | 61 6c 20 70 6f 69 6e 74 |ions leg|al point|
|00004fc0| 65 72 73 20 61 73 20 74 | 68 65 20 72 65 74 75 72 |ers as t|he retur|
|00004fd0| 6e 20 76 61 72 69 61 62 | 6c 65 73 20 65 76 65 6e |n variab|les even|
|00004fe0| 20 69 66 20 79 6f 75 20 | 64 6f 6e 27 74 0d 0a 6e | if you |don't..n|
|00004ff0| 65 65 64 20 74 68 65 20 | 72 65 74 75 72 6e 20 76 |eed the |return v|
|00005000| 61 6c 75 65 73 20 2d 2d | 2d 20 6d 65 6d 6f 72 79 |alues --|- memory|
|00005010| 20 63 6f 72 72 75 70 74 | 69 6f 6e 20 6d 61 79 20 | corrupt|ion may |
|00005020| 6f 63 63 75 72 20 6f 74 | 68 65 72 77 69 73 65 2e |occur ot|herwise.|
|00005030| 0d 0a 0d 0a 46 6f 72 20 | 65 78 61 6d 70 6c 65 2c |....For |example,|
|00005040| 20 74 6f 20 71 75 65 72 | 79 20 74 68 65 20 63 75 | to quer|y the cu|
|00005050| 72 72 65 6e 74 20 76 6f | 6c 75 6d 65 20 6f 6e 20 |rrent vo|lume on |
|00005060| 63 68 61 6e 6e 65 6c 20 | 33 20 69 6e 20 74 68 65 |channel |3 in the|
|00005070| 20 64 65 66 61 75 6c 74 | 20 53 6f 75 6e 64 0d 0a | default| Sound..|
|00005080| 44 65 76 69 63 65 2c 20 | 79 6f 75 20 63 61 6e 20 |Device, |you can |
|00005090| 75 73 65 3a 0d 0a 0d 0a | 5c 62 65 67 69 6e 7b 76 |use:....|\begin{v|
|000050a0| 65 72 62 61 74 69 6d 7d | 0d 0a 75 6e 73 69 67 6e |erbatim}|..unsign|
|000050b0| 65 64 20 76 6f 6c 3b 0d | 0a 2e 2e 2e 0d 0a 6d 69 |ed vol;.|......mi|
|000050c0| 64 61 73 53 44 2d 3e 47 | 65 74 56 6f 6c 75 6d 65 |dasSD->G|etVolume|
|000050d0| 28 33 2c 20 26 76 6f 6c | 29 3b 0d 0a 2e 2e 2e 0d |(3, &vol|);......|
|000050e0| 0a 5c 65 6e 64 7b 76 65 | 72 62 61 74 69 6d 7d 0d |.\end{ve|rbatim}.|
|000050f0| 0a 0d 0a 4e 6f 74 65 20 | 74 68 61 74 20 69 6e 20 |...Note |that in |
|00005100| 61 20 72 65 61 6c 2d 6c | 69 66 65 20 70 72 6f 67 |a real-l|ife prog|
|00005110| 72 61 6d 20 79 6f 75 20 | 61 6c 73 6f 20 6e 65 65 |ram you |also nee|
|00005120| 64 20 74 6f 20 68 61 6e | 64 6c 65 20 74 68 65 20 |d to han|dle the |
|00005130| 72 65 74 75 72 6e 65 64 | 20 65 72 72 6f 72 0d 0a |returned| error..|
|00005140| 63 6f 64 65 2e 0d 0a 0d | 0a 5b 54 4f 44 4f 3a 4f |code....|.[TODO:O|
|00005150| 53 2d 53 70 65 63 69 66 | 69 63 5d 20 7b 5c 62 66 |S-Specif|ic] {\bf|
|00005160| 20 4d 53 2d 44 4f 53 20 | 4e 6f 74 65 21 7d 20 43 | MS-DOS |Note!} C|
|00005170| 6f 64 65 20 75 73 69 6e | 67 20 4d 49 44 41 53 20 |ode usin|g MIDAS |
|00005180| 6e 65 65 64 73 20 74 6f | 20 68 61 76 65 20 74 68 |needs to| have th|
|00005190| 65 0d 0a 63 6f 6d 70 69 | 6c 65 72 20 27 27 53 53 |e..compi|ler ''SS|
|000051a0| 3d 3d 44 53 27 27 20 2d | 61 73 73 75 6d 70 74 69 |==DS'' -|assumpti|
|000051b0| 6f 6e 20 64 69 73 61 62 | 6c 65 64 2e 20 54 68 69 |on disab|led. Thi|
|000051c0| 73 20 69 73 20 62 65 63 | 61 75 73 65 20 74 68 65 |s is bec|ause the|
|000051d0| 20 73 74 61 63 6b 20 75 | 73 65 64 20 62 79 0d 0a | stack u|sed by..|
|000051e0| 74 68 65 20 74 69 6d 65 | 72 20 69 6e 74 65 72 72 |the time|r interr|
|000051f0| 75 70 74 20 28 61 6e 64 | 20 74 68 75 73 20 6d 6f |upt (and| thus mo|
|00005200| 73 74 20 6f 66 20 4d 49 | 44 41 53 20 63 6f 64 65 |st of MI|DAS code|
|00005210| 20 70 6c 75 73 20 61 6e | 79 20 75 73 65 72 20 63 | plus an|y user c|
|00005220| 61 6c 6c 62 61 63 6b 73 | 29 0d 0a 6d 69 67 68 74 |allbacks|)..might|
|00005230| 20 62 65 20 64 69 66 66 | 65 72 65 6e 74 20 66 72 | be diff|erent fr|
|00005240| 6f 6d 20 74 68 65 20 6d | 61 69 6e 20 70 72 6f 67 |om the m|ain prog|
|00005250| 72 61 6d 20 73 74 61 63 | 6b 2c 20 61 6e 64 20 74 |ram stac|k, and t|
|00005260| 68 65 20 63 6f 6d 70 69 | 6c 65 72 20 73 68 6f 75 |he compi|ler shou|
|00005270| 6c 64 0d 0a 74 68 65 72 | 65 66 6f 72 65 20 6e 6f |ld..ther|efore no|
|00005280| 74 20 67 65 6e 65 72 61 | 74 65 20 63 6f 64 65 20 |t genera|te code |
|00005290| 74 68 61 74 20 75 73 65 | 73 20 64 61 74 61 20 73 |that use|s data s|
|000052a0| 65 67 6d 65 6e 74 20 76 | 61 72 69 61 62 6c 65 73 |egment v|ariables|
|000052b0| 20 76 69 61 20 74 68 65 | 20 73 74 61 63 6b 0d 0a | via the| stack..|
|000052c0| 73 65 67 6d 65 6e 74 2e | 20 42 65 63 61 75 73 65 |segment.| Because|
|000052d0| 20 6f 66 20 74 68 69 73 | 2c 20 61 6e 79 20 70 6f | of this|, any po|
|000052e0| 69 6e 74 65 72 73 20 74 | 68 61 74 20 79 6f 75 20 |inters t|hat you |
|000052f0| 70 61 73 73 20 74 6f 20 | 4d 49 44 41 53 20 66 75 |pass to |MIDAS fu|
|00005300| 6e 63 74 69 6f 6e 73 20 | 6e 65 65 64 0d 0a 74 6f |nctions |need..to|
|00005310| 20 70 6f 69 6e 74 20 74 | 6f 20 64 61 74 61 20 73 | point t|o data s|
|00005320| 65 67 6d 65 6e 74 20 76 | 61 72 69 61 62 6c 65 73 |egment v|ariables|
|00005330| 20 2d 2d 2d 20 69 6e 20 | 6f 74 68 65 72 20 77 6f | --- in |other wo|
|00005340| 72 64 73 2c 20 69 6e 20 | 74 68 65 20 65 78 61 6d |rds, in |the exam|
|00005350| 70 6c 65 20 61 62 6f 76 | 65 2c 0d 0a 5c 62 65 67 |ple abov|e,..\beg|
|00005360| 69 6e 7b 76 65 72 62 61 | 74 69 6d 7d 0d 0a 75 6e |in{verba|tim}..un|
|00005370| 73 69 67 6e 65 64 20 76 | 6f 6c 3b 0d 0a 5c 65 6e |signed v|ol;..\en|
|00005380| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0d 0a 6e 65 65 |d{verbat|im}..nee|
|00005390| 64 73 20 74 6f 20 62 65 | 20 63 68 61 6e 67 65 64 |ds to be| changed|
|000053a0| 20 74 6f 0d 0a 5c 62 65 | 67 69 6e 7b 76 65 72 62 | to..\be|gin{verb|
|000053b0| 61 74 69 6d 7d 0d 0a 73 | 74 61 74 69 63 20 75 6e |atim}..s|tatic un|
|000053c0| 73 69 67 6e 65 64 20 76 | 6f 6c 3b 0d 0a 5c 65 6e |signed v|ol;..\en|
|000053d0| 64 7b 76 65 72 62 61 74 | 69 6d 7d 0d 0a 74 6f 20 |d{verbat|im}..to |
|000053e0| 65 6e 73 75 72 65 20 74 | 68 65 20 6c 6f 63 61 6c |ensure t|he local|
|000053f0| 20 76 61 72 69 61 62 6c | 65 20 67 65 74 73 20 70 | variabl|e gets p|
|00005400| 6c 61 63 65 64 20 69 6e | 20 64 61 74 61 20 73 65 |laced in| data se|
|00005410| 67 6d 65 6e 74 2e 20 50 | 6f 69 6e 74 65 72 73 20 |gment. P|ointers |
|00005420| 74 6f 20 67 6c 6f 62 61 | 6c 0d 0a 76 61 72 69 61 |to globa|l..varia|
|00005430| 62 6c 65 73 20 63 61 6e | 20 6e 61 74 75 72 61 6c |bles can| natural|
|00005440| 6c 79 20 62 65 20 75 73 | 65 64 20 77 69 74 68 6f |ly be us|ed witho|
|00005450| 75 74 20 61 6e 79 20 6d | 6f 64 69 66 69 63 61 74 |ut any m|odificat|
|00005460| 69 6f 6e 73 2e 0d 0a 0d | 0a 0d 0a 5c 73 65 63 74 |ions....|...\sect|
|00005470| 69 6f 6e 7b 45 72 72 6f | 72 20 68 61 6e 64 6c 69 |ion{Erro|r handli|
|00005480| 6e 67 7d 0d 0a 0d 0a 54 | 68 65 20 73 65 63 74 69 |ng}....T|he secti|
|00005490| 6f 6e 20 61 62 6f 76 65 | 20 61 6c 72 65 61 64 79 |on above| already|
|000054a0| 20 67 61 76 65 20 61 20 | 62 72 69 65 66 20 69 6e | gave a |brief in|
|000054b0| 74 72 6f 64 75 63 74 69 | 6f 6e 20 74 6f 20 4d 49 |troducti|on to MI|
|000054c0| 44 41 53 20 65 72 72 6f | 72 20 68 61 6e 64 6c 69 |DAS erro|r handli|
|000054d0| 6e 67 2c 0d 0a 62 75 74 | 20 74 68 69 73 20 73 65 |ng,..but| this se|
|000054e0| 63 74 69 6f 6e 20 77 69 | 6c 6c 20 64 65 73 63 72 |ction wi|ll descr|
|000054f0| 69 62 65 20 69 74 20 69 | 6e 20 64 65 74 61 69 6c |ibe it i|n detail|
|00005500| 2e 0d 0a 0d 0a 4d 49 44 | 41 53 20 75 73 65 73 20 |.....MID|AS uses |
|00005510| 61 20 63 6f 6d 6d 6f 6e | 20 6d 65 74 68 6f 64 20 |a common| method |
|00005520| 66 6f 72 20 68 61 6e 64 | 6c 69 6e 67 20 65 72 72 |for hand|ling err|
|00005530| 6f 72 73 20 74 68 72 6f | 75 67 68 6f 75 74 20 74 |ors thro|ughout t|
|00005540| 68 65 20 73 79 73 74 65 | 6d 2e 20 41 6c 6c 0d 0a |he syste|m. All..|
|00005550| 66 75 6e 63 74 69 6f 6e | 73 20 72 65 74 75 72 6e |function|s return|
|00005560| 20 61 6e 20 65 72 72 6f | 72 20 63 6f 64 65 2c 20 | an erro|r code, |
|00005570| 61 6e 64 20 69 74 20 69 | 73 20 75 70 20 74 6f 20 |and it i|s up to |
|00005580| 74 68 65 20 63 61 6c 6c | 65 72 20 74 6f 20 64 65 |the call|er to de|
|00005590| 63 69 64 65 20 68 6f 77 | 20 74 6f 0d 0a 68 61 6e |cide how| to..han|
|000055a0| 64 6c 65 20 74 68 65 20 | 65 72 72 6f 72 20 63 6f |dle the |error co|
|000055b0| 6e 64 69 74 69 6f 6e 2e | 20 4d 6f 73 74 20 66 75 |ndition.| Most fu|
|000055c0| 6e 63 74 69 6f 6e 73 20 | 73 69 6d 70 6c 79 20 70 |nctions |simply p|
|000055d0| 61 73 73 20 74 68 65 20 | 65 72 72 6f 72 20 63 6f |ass the |error co|
|000055e0| 64 65 20 74 6f 0d 0a 74 | 68 65 69 72 20 63 61 6c |de to..t|heir cal|
|000055f0| 6c 65 72 2c 20 62 75 74 | 20 69 74 20 69 73 20 72 |ler, but| it is r|
|00005600| 65 63 6f 6d 6d 65 6e 64 | 65 64 20 74 68 61 74 20 |ecommend|ed that |
|00005610| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 64 6f 65 |the func|tion doe|
|00005620| 73 20 61 73 20 6d 75 63 | 68 20 63 6c 65 61 6e 2d |s as muc|h clean-|
|00005630| 75 70 0d 0a 61 73 20 70 | 6f 73 73 69 62 6c 65 20 |up..as p|ossible |
|00005640| 62 65 66 6f 72 65 20 64 | 6f 69 6e 67 20 73 6f 2e |before d|oing so.|
|00005650| 20 49 6e 20 70 61 72 74 | 69 63 75 6c 61 72 2c 20 | In part|icular, |
|00005660| 61 6c 6c 20 61 6c 6c 6f | 63 61 74 65 64 20 6d 65 |all allo|cated me|
|00005670| 6d 6f 72 79 20 73 68 6f | 75 6c 64 20 62 65 0d 0a |mory sho|uld be..|
|00005680| 64 65 61 6c 6c 6f 63 61 | 74 65 64 20 61 6e 64 20 |dealloca|ted and |
|00005690| 61 6c 6c 20 6f 70 65 6e | 20 66 69 6c 65 73 20 63 |all open| files c|
|000056a0| 6c 6f 73 65 64 2e 0d 0a | 0d 0a 57 68 65 6e 20 4d |losed...|..When M|
|000056b0| 49 44 41 53 20 69 73 20 | 63 6f 6d 70 69 6c 65 64 |IDAS is |compiled|
|000056c0| 20 69 6e 20 44 45 42 55 | 47 20 6d 6f 64 65 2c 20 | in DEBU|G mode, |
|000056d0| 74 68 65 20 65 72 72 6f | 72 20 68 61 6e 64 6c 69 |the erro|r handli|
|000056e0| 6e 67 20 73 79 73 74 65 | 6d 20 68 61 73 0d 0a 61 |ng syste|m has..a|
|000056f0| 64 64 69 74 69 6f 6e 61 | 6c 20 66 75 6e 63 74 69 |dditiona|l functi|
|00005700| 6f 6e 61 6c 69 74 79 2e | 20 49 74 20 77 69 6c 6c |onality.| It will|
|00005710| 20 62 75 69 6c 64 20 75 | 70 20 61 20 6c 69 73 74 | build u|p a list|
|00005720| 20 6f 66 20 61 6c 6c 20 | 65 72 72 6f 72 73 20 74 | of all |errors t|
|00005730| 68 61 74 0d 0a 6f 63 63 | 75 72 72 65 64 2c 20 77 |hat..occ|urred, w|
|00005740| 69 74 68 20 74 68 65 20 | 6e 61 6d 65 20 6f 66 20 |ith the |name of |
|00005750| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 20 74 68 61 |the func|tion tha|
|00005760| 74 20 72 61 69 73 65 64 | 20 74 68 65 20 65 72 72 |t raised| the err|
|00005770| 6f 72 2e 20 57 68 65 6e | 20 65 72 72 6f 72 73 0d |or. When| errors.|
|00005780| 0a 61 72 65 20 74 68 65 | 6e 20 70 61 73 73 65 64 |.are the|n passed|
|00005790| 20 75 70 77 61 72 64 73 | 20 69 6e 20 74 68 65 20 | upwards| in the |
|000057a0| 66 75 6e 63 74 69 6f 6e | 20 63 61 6c 6c 20 73 74 |function| call st|
|000057b0| 61 63 6b 2c 20 61 6c 6c | 20 66 75 6e 63 74 69 6f |ack, all| functio|
|000057c0| 6e 73 20 61 72 65 20 61 | 64 64 65 64 0d 0a 74 6f |ns are a|dded..to|
|000057d0| 20 74 68 65 20 6c 69 73 | 74 2e 20 54 68 75 73 20 | the lis|t. Thus |
|000057e0| 74 68 65 20 65 72 72 6f | 72 20 65 78 69 74 20 6e |the erro|r exit n|
|000057f0| 6f 74 20 6f 6e 6c 79 20 | 72 65 70 6f 72 74 73 20 |ot only |reports |
|00005800| 77 68 61 74 20 65 72 72 | 6f 72 20 6f 63 63 75 72 |what err|or occur|
|00005810| 72 65 64 2c 20 62 75 74 | 0d 0a 61 6c 73 6f 20 77 |red, but|..also w|
|00005820| 68 61 74 20 66 75 6e 63 | 74 69 6f 6e 20 63 61 75 |hat func|tion cau|
|00005830| 73 65 64 20 74 68 65 20 | 65 72 72 6f 72 20 61 6e |sed the |error an|
|00005840| 64 20 77 68 65 72 65 20 | 69 74 20 77 61 73 20 63 |d where |it was c|
|00005850| 61 6c 6c 65 64 2e 0d 0a | 0d 0a 0d 0a 0d 0a 5c 63 |alled...|......\c|
|00005860| 68 61 70 74 65 72 7b 4f | 70 65 72 61 74 69 6e 67 |hapter{O|perating|
|00005870| 20 73 79 73 74 65 6d 20 | 73 70 65 63 69 66 69 63 | system |specific|
|00005880| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 7d 0d 0a 0d | informa|tion}...|
|00005890| 0a 41 6c 74 68 6f 75 67 | 68 20 74 68 65 20 6e 6f |.Althoug|h the no|
|000058a0| 72 6d 61 6c 20 4d 49 44 | 41 53 20 41 50 49 73 20 |rmal MID|AS APIs |
|000058b0| 61 72 65 20 69 6e 64 65 | 6e 74 69 63 61 6c 20 69 |are inde|ntical i|
|000058c0| 6e 20 61 6c 6c 20 73 75 | 70 70 6f 72 74 65 64 20 |n all su|pported |
|000058d0| 70 6c 61 74 66 6f 72 6d | 73 2c 0d 0a 74 68 65 72 |platform|s,..ther|
|000058e0| 65 20 61 72 65 20 73 6f | 6d 65 20 6f 70 65 72 61 |e are so|me opera|
|000058f0| 74 69 6e 67 20 73 79 73 | 74 65 6d 20 73 70 65 63 |ting sys|tem spec|
|00005900| 69 66 69 63 20 70 6f 69 | 6e 74 73 20 74 68 61 74 |ific poi|nts that|
|00005910| 20 73 68 6f 75 6c 64 20 | 62 65 20 6e 6f 74 65 64 | should |be noted|
|00005920| 2e 20 49 6e 0d 0a 70 61 | 72 74 69 63 75 6c 61 72 |. In..pa|rticular|
|00005930| 2c 20 74 68 65 20 6c 69 | 6d 69 74 61 74 69 6f 6e |, the li|mitation|
|00005940| 73 20 6f 66 20 74 68 65 | 20 4d 53 2d 44 4f 53 20 |s of the| MS-DOS |
|00005950| 6f 70 65 72 61 74 69 6e | 67 20 73 79 73 74 65 6d |operatin|g system|
|00005960| 20 6d 61 6b 65 20 69 74 | 20 73 6f 6d 65 77 68 61 | make it| somewha|
|00005970| 74 0d 0a 64 69 66 66 69 | 63 75 6c 74 20 74 6f 20 |t..diffi|cult to |
|00005980| 70 72 6f 67 72 61 6d 20 | 75 6e 64 65 72 2e 0d 0a |program |under...|
|00005990| 0d 0a 0d 0a 5c 73 65 63 | 74 69 6f 6e 7b 4d 53 2d |....\sec|tion{MS-|
|000059a0| 44 4f 53 20 74 69 6d 65 | 72 20 73 63 72 65 65 6e |DOS time|r screen|
|000059b0| 20 73 79 6e 63 68 72 6f | 6e 69 7a 61 74 69 6f 6e | synchro|nization|
|000059c0| 7d 0d 0a 0d 0a 54 68 69 | 73 20 73 65 63 74 69 6f |}....Thi|s sectio|
|000059d0| 6e 20 64 65 73 63 72 69 | 62 65 73 20 68 6f 77 20 |n descri|bes how |
|000059e0| 74 6f 20 75 73 65 20 74 | 68 65 20 62 75 69 6c 74 |to use t|he built|
|000059f0| 2d 69 6e 20 4d 49 44 41 | 53 20 73 63 72 65 65 6e |-in MIDA|S screen|
|00005a00| 20 73 79 6e 63 68 72 6f | 6e 69 7a 65 64 0d 0a 74 | synchro|nized..t|
|00005a10| 69 6d 65 72 20 75 6e 64 | 65 72 20 4d 53 2d 44 4f |imer und|er MS-DO|
|00005a20| 53 2e 20 54 68 69 73 20 | 69 6e 66 6f 72 6d 61 74 |S. This |informat|
|00005a30| 69 6f 6e 20 69 73 20 6e | 6f 74 20 72 65 6c 65 76 |ion is n|ot relev|
|00005a40| 61 6e 74 20 69 6e 20 6f | 74 68 65 72 20 6f 70 65 |ant in o|ther ope|
|00005a50| 72 61 74 69 6e 67 0d 0a | 73 79 73 74 65 6d 73 2e |rating..|systems.|
|00005a60| 0d 0a 0d 0a 5c 73 75 62 | 73 65 63 74 69 6f 6e 7b |....\sub|section{|
|00005a70| 49 6e 74 72 6f 64 75 63 | 74 69 6f 6e 7d 0d 0a 0d |Introduc|tion}...|
|00005a80| 0a 4d 49 44 41 53 20 53 | 6f 75 6e 64 20 53 79 73 |.MIDAS S|ound Sys|
|00005a90| 74 65 6d 20 74 69 6d 65 | 72 20 69 6e 63 6c 75 64 |tem time|r includ|
|00005aa0| 65 73 20 62 75 69 6c 74 | 2d 69 6e 20 73 75 70 70 |es built|-in supp|
|00005ab0| 6f 72 74 20 66 6f 72 20 | 73 63 72 65 65 6e 0d 0a |ort for |screen..|
|00005ac0| 73 79 6e 63 68 72 6f 6e | 69 7a 61 74 69 6f 6e 2e |synchron|ization.|
|00005ad0| 20 54 68 69 73 20 6d 65 | 61 6e 73 20 74 68 61 74 | This me|ans that|
|00005ae0| 20 79 6f 75 20 63 61 6e | 20 70 72 6f 67 72 61 6d | you can| program|
|00005af0| 20 74 68 65 20 74 69 6d | 65 72 20 74 6f 20 63 61 | the tim|er to ca|
|00005b00| 6c 6c 20 79 6f 75 72 20 | 6f 77 6e 0d 0a 72 6f 75 |ll your |own..rou|
|00005b10| 74 69 6e 65 73 20 65 76 | 65 72 79 20 66 72 61 6d |tines ev|ery fram|
|00005b20| 65 2c 20 6d 6f 72 65 20 | 65 78 61 63 74 6c 79 20 |e, more |exactly |
|00005b30| 69 6d 6d 65 64 69 61 74 | 65 6c 79 20 62 65 66 6f |immediat|ely befo|
|00005b40| 72 65 20 74 68 65 20 56 | 65 72 74 69 63 61 6c 20 |re the V|ertical |
|00005b50| 52 65 74 72 61 63 65 2c | 0d 0a 69 6d 6d 65 64 69 |Retrace,|..immedi|
|00005b60| 61 74 65 6c 79 20 61 66 | 74 65 72 20 74 68 65 20 |ately af|ter the |
|00005b70| 56 65 72 74 69 63 61 6c | 20 52 65 74 72 61 63 65 |Vertical| Retrace|
|00005b80| 20 68 61 73 20 73 74 61 | 72 74 65 64 20 61 6e 64 | has sta|rted and|
|00005b90| 20 6c 61 74 65 72 20 64 | 75 72 69 6e 67 20 74 68 | later d|uring th|
|00005ba0| 65 0d 0a 56 65 72 74 69 | 63 61 6c 20 52 65 74 72 |e..Verti|cal Retr|
|00005bb0| 61 63 65 2e 20 54 68 69 | 73 20 65 6e 61 62 6c 65 |ace. Thi|s enable|
|00005bc0| 73 20 79 6f 75 20 74 6f | 20 73 79 6e 63 68 72 6f |s you to| synchro|
|00005bd0| 6e 69 7a 65 20 79 6f 75 | 72 20 70 72 6f 67 72 61 |nize you|r progra|
|00005be0| 6d 20 74 6f 20 74 68 65 | 20 73 63 72 65 65 6e 0d |m to the| screen.|
|00005bf0| 0a 75 70 64 61 74 65 20 | 74 6f 20 67 65 74 20 73 |.update |to get s|
|00005c00| 6d 6f 6f 74 68 20 61 6e | 69 6d 61 74 69 6f 6e 2c |mooth an|imation,|
|00005c10| 20 77 68 69 63 68 20 6f | 74 68 65 72 77 69 73 65 | which o|therwise|
|00005c20| 20 77 6f 75 6c 64 20 6e | 6f 74 20 62 65 20 70 6f | would n|ot be po|
|00005c30| 73 73 69 62 6c 65 20 77 | 69 74 68 20 61 0d 0a 6d |ssible w|ith a..m|
|00005c40| 75 73 69 63 20 73 79 73 | 74 65 6d 20 70 6c 61 79 |usic sys|tem play|
|00005c50| 69 6e 67 20 69 6e 20 74 | 68 65 20 62 61 63 6b 67 |ing in t|he backg|
|00005c60| 72 6f 75 6e 64 2e 20 20 | 54 68 65 20 72 6f 75 74 |round. |The rout|
|00005c70| 69 6e 65 73 20 63 61 6e | 20 61 6c 73 6f 20 62 65 |ines can| also be|
|00005c80| 20 75 73 65 64 20 66 6f | 72 0d 0a 63 68 61 6e 67 | used fo|r..chang|
|00005c90| 69 6e 67 20 56 47 41 20 | 68 61 72 64 77 61 72 65 |ing VGA |hardware|
|00005ca0| 20 72 65 67 69 73 74 65 | 72 73 2c 20 73 75 63 68 | registe|rs, such|
|00005cb0| 20 61 73 20 64 69 73 70 | 6c 61 79 20 73 74 61 72 | as disp|lay star|
|00005cc0| 74 20 61 64 64 72 65 73 | 73 20 61 6e 64 20 73 63 |t addres|s and sc|
|00005cd0| 72 6f 6c 6c 69 6e 67 2c | 0d 0a 69 6e 20 63 6f 72 |rolling,|..in cor|
|00005ce0| 72 65 63 74 20 6d 6f 6d | 65 6e 74 73 2c 20 66 6f |rect mom|ents, fo|
|00005cf0| 72 20 74 72 69 70 6c 65 | 20 62 75 66 66 65 72 69 |r triple| bufferi|
|00005d00| 6e 67 20 61 6e 64 20 66 | 6f 72 20 63 6f 6d 70 65 |ng and f|or compe|
|00005d10| 6e 73 61 74 69 6e 67 20 | 66 6f 72 20 64 69 66 66 |nsating |for diff|
|00005d20| 65 72 65 6e 74 0d 0a 6d | 61 63 68 69 6e 65 20 73 |erent..m|achine s|
|00005d30| 70 65 65 64 73 2e 0d 0a | 0d 0a 0d 0a 5c 73 75 62 |peeds...|....\sub|
|00005d40| 73 65 63 74 69 6f 6e 7b | 55 73 69 6e 67 20 73 63 |section{|Using sc|
|00005d50| 72 65 65 6e 20 73 79 6e | 63 68 72 6f 6e 69 7a 61 |reen syn|chroniza|
|00005d60| 74 69 6f 6e 7d 0d 0a 0d | 0a 49 66 20 79 6f 75 20 |tion}...|.If you |
|00005d70| 77 69 73 68 20 74 6f 20 | 75 73 65 20 74 69 6d 65 |wish to |use time|
|00005d80| 72 20 73 63 72 65 65 6e | 20 73 79 6e 63 68 72 6f |r screen| synchro|
|00005d90| 6e 69 7a 61 74 69 6f 6e | 2c 20 75 73 65 20 74 68 |nization|, use th|
|00005da0| 65 20 70 72 6f 63 65 64 | 75 72 65 20 6f 75 74 6c |e proced|ure outl|
|00005db0| 69 6e 65 64 0d 0a 62 65 | 6c 6f 77 3a 0d 0a 0d 0a |ined..be|low:....|
|00005dc0| 31 2e 20 42 45 46 4f 52 | 45 20 4d 49 44 41 53 20 |1. BEFOR|E MIDAS |
|00005dd0| 53 6f 75 6e 64 20 53 79 | 73 74 65 6d 20 69 73 20 |Sound Sy|stem is |
|00005de0| 69 6e 69 74 69 61 6c 69 | 7a 65 64 2c 20 73 65 74 |initiali|zed, set|
|00005df0| 20 75 70 20 74 68 65 20 | 64 69 73 70 6c 61 79 20 | up the |display |
|00005e00| 6d 6f 64 65 20 79 6f 75 | 20 61 72 65 0d 0a 69 6e |mode you| are..in|
|00005e10| 74 65 6e 64 69 6e 67 20 | 74 6f 20 75 73 65 20 61 |tending |to use a|
|00005e20| 6e 64 20 67 65 74 20 74 | 68 65 20 74 69 6d 65 72 |nd get t|he timer|
|00005e30| 20 73 63 72 65 65 6e 20 | 73 79 6e 63 68 72 6f 6e | screen |synchron|
|00005e40| 69 7a 61 74 69 6f 6e 20 | 76 61 6c 75 65 20 63 6f |ization |value co|
|00005e50| 72 72 65 73 70 6f 6e 64 | 69 6e 67 0d 0a 74 6f 20 |rrespond|ing..to |
|00005e60| 74 68 61 74 20 64 69 73 | 70 6c 61 79 20 6d 6f 64 |that dis|play mod|
|00005e70| 65 20 75 73 69 6e 67 20 | 7b 5c 65 6d 20 74 6d 72 |e using |{\em tmr|
|00005e80| 47 65 74 53 63 72 53 79 | 6e 63 28 29 7d 2e 20 49 |GetScrSy|nc()}. I|
|00005e90| 66 20 79 6f 75 20 61 72 | 65 20 75 73 69 6e 67 20 |f you ar|e using |
|00005ea0| 73 65 76 65 72 61 6c 0d | 0a 64 69 73 70 6c 61 79 |several.|.display|
|00005eb0| 20 6d 6f 64 65 73 20 77 | 69 74 68 20 64 69 66 66 | modes w|ith diff|
|00005ec0| 65 72 65 6e 74 20 72 65 | 66 72 65 73 68 20 72 61 |erent re|fresh ra|
|00005ed0| 74 65 73 20 28 69 6e 20 | 70 72 61 63 74 69 73 65 |tes (in |practise|
|00005ee0| 2c 20 64 69 66 66 65 72 | 65 6e 74 20 76 65 72 74 |, differ|ent vert|
|00005ef0| 69 63 61 6c 0d 0a 72 65 | 73 6f 6c 75 74 69 6f 6e |ical..re|solution|
|00005f00| 73 2c 20 61 6c 74 68 6f | 75 67 68 20 69 6e 20 73 |s, altho|ugh in s|
|00005f10| 74 61 6e 64 61 72 64 20 | 56 47 41 20 6f 6e 6c 79 |tandard |VGA only|
|00005f20| 20 32 34 30 20 6f 72 20 | 34 38 30 20 73 63 61 6e | 240 or |480 scan|
|00005f30| 20 6c 69 6e 65 20 6d 6f | 64 65 73 20 68 61 76 65 | line mo|des have|
|00005f40| 0d 0a 64 69 66 66 65 72 | 65 6e 74 20 72 65 66 72 |..differ|ent refr|
|00005f50| 65 73 68 20 72 61 74 65 | 73 29 20 79 6f 75 20 6d |esh rate|s) you m|
|00005f60| 75 73 74 20 61 63 74 69 | 76 61 74 65 20 65 61 63 |ust acti|vate eac|
|00005f70| 68 20 6f 66 20 74 68 65 | 6d 20 69 6e 20 74 75 72 |h of the|m in tur|
|00005f80| 6e 20 61 6e 64 20 67 65 | 74 20 74 68 65 0d 0a 73 |n and ge|t the..s|
|00005f90| 79 6e 63 68 72 6f 6e 69 | 7a 61 74 69 6f 6e 20 76 |ynchroni|zation v|
|00005fa0| 61 6c 75 65 73 20 66 6f | 72 20 65 61 63 68 20 6f |alues fo|r each o|
|00005fb0| 66 20 74 68 65 6d 2e 0d | 0a 0d 0a 32 2e 20 49 6e |f them..|...2. In|
|00005fc0| 69 74 69 61 6c 69 7a 65 | 20 4d 49 44 41 53 20 53 |itialize| MIDAS S|
|00005fd0| 6f 75 6e 64 20 53 79 73 | 74 65 6d 20 65 74 63 2e |ound Sys|tem etc.|
|00005fe0| 0d 0a 0d 0a 33 2e 20 53 | 65 74 20 75 70 20 74 68 |....3. S|et up th|
|00005ff0| 65 20 64 69 73 70 6c 61 | 79 20 6d 6f 64 65 0d 0a |e displa|y mode..|
|00006000| 0d 0a 34 2e 20 57 68 65 | 6e 20 79 6f 75 20 6e 65 |..4. Whe|n you ne|
|00006010| 65 64 20 74 69 6d 65 72 | 20 73 63 72 65 65 6e 20 |ed timer| screen |
|00006020| 73 79 6e 63 68 72 6f 6e | 69 7a 61 74 69 6f 6e 2c |synchron|ization,|
|00006030| 20 73 74 61 72 74 20 69 | 74 20 75 73 69 6e 67 20 | start i|t using |
|00006040| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 0d 0a 7b 5c |the func|tion..{\|
|00006050| 65 6d 20 74 6d 72 53 79 | 6e 63 53 63 72 28 29 7d |em tmrSy|ncScr()}|
|00006060| 2c 20 70 61 73 73 69 6e | 67 20 61 73 20 61 72 67 |, passin|g as arg|
|00006070| 75 6d 65 6e 74 73 20 74 | 68 65 20 74 69 6d 65 72 |uments t|he timer|
|00006080| 20 73 63 72 65 65 6e 20 | 73 79 6e 63 68 72 6f 6e | screen |synchron|
|00006090| 69 7a 61 74 69 6f 6e 0d | 0a 76 61 6c 75 65 20 66 |ization.|.value f|
|000060a0| 72 6f 6d 20 73 74 65 70 | 20 31 20 61 6e 64 20 70 |rom step| 1 and p|
|000060b0| 6f 69 6e 74 65 72 73 20 | 74 6f 20 74 68 65 20 72 |ointers |to the r|
|000060c0| 6f 75 74 69 6e 65 73 20 | 79 6f 75 20 77 69 73 68 |outines |you wish|
|000060d0| 20 74 68 65 20 74 69 6d | 65 72 20 74 6f 20 63 61 | the tim|er to ca|
|000060e0| 6c 6c 2e 20 49 66 0d 0a | 79 6f 75 20 64 6f 20 6e |ll. If..|you do n|
|000060f0| 6f 74 20 72 65 71 75 69 | 72 65 20 73 75 70 70 6f |ot requi|re suppo|
|00006100| 72 74 20 66 6f 72 20 73 | 6f 6d 65 20 72 6f 75 74 |rt for s|ome rout|
|00006110| 69 6e 65 2c 20 70 61 73 | 73 20 61 20 4e 55 4c 4c |ine, pas|s a NULL|
|00006120| 20 70 6f 69 6e 74 65 72 | 20 69 6e 73 74 65 61 64 | pointer| instead|
|00006130| 2e 0d 0a 0d 0a 35 2e 20 | 57 68 65 6e 20 74 69 6d |.....5. |When tim|
|00006140| 65 72 20 73 63 72 65 65 | 6e 20 73 79 6e 63 68 72 |er scree|n synchr|
|00006150| 6f 6e 69 7a 61 74 69 6f | 6e 20 69 73 20 6e 6f 20 |onizatio|n is no |
|00006160| 6c 6f 6e 67 65 72 20 72 | 65 71 75 69 72 65 64 2c |longer r|equired,|
|00006170| 20 73 74 6f 70 20 69 74 | 20 75 73 69 6e 67 0d 0a | stop it| using..|
|00006180| 7b 5c 65 6d 20 74 6d 72 | 53 74 6f 70 53 63 72 53 |{\em tmr|StopScrS|
|00006190| 79 6e 63 28 29 7d 2e 0d | 0a 0d 0a 49 66 20 79 6f |ync()}..|...If yo|
|000061a0| 75 20 63 68 61 6e 67 65 | 20 74 68 65 20 64 69 73 |u change| the dis|
|000061b0| 70 6c 61 79 20 6d 6f 64 | 65 20 74 6f 20 6f 6e 65 |play mod|e to one|
|000061c0| 20 77 69 74 68 20 61 20 | 64 69 66 66 65 72 65 6e | with a |differen|
|000061d0| 74 20 72 65 66 72 65 73 | 68 20 72 61 74 65 2c 20 |t refres|h rate, |
|000061e0| 79 6f 75 20 6d 75 73 74 | 0d 0a 66 69 72 73 74 20 |you must|..first |
|000061f0| 73 74 6f 70 20 74 68 65 | 20 73 63 72 65 65 6e 20 |stop the| screen |
|00006200| 73 79 6e 63 68 72 6f 6e | 69 7a 61 74 69 6f 6e 2c |synchron|ization,|
|00006210| 20 63 68 61 6e 67 65 20 | 74 68 65 20 64 69 73 70 | change |the disp|
|00006220| 6c 61 79 20 6d 6f 64 65 | 2c 20 61 6e 64 20 61 66 |lay mode|, and af|
|00006230| 74 65 72 0d 0a 74 68 61 | 74 20 72 65 2d 73 79 6e |ter..tha|t re-syn|
|00006240| 63 68 72 6f 6e 69 7a 65 | 20 74 68 65 20 74 69 6d |chronize| the tim|
|00006250| 65 72 2e 20 50 6c 65 61 | 73 65 20 6e 6f 74 65 20 |er. Plea|se note |
|00006260| 74 68 61 74 20 73 79 6e | 63 68 72 6f 6e 69 7a 69 |that syn|chronizi|
|00006270| 6e 67 20 74 68 65 20 74 | 69 6d 65 72 20 74 6f 0d |ng the t|imer to.|
|00006280| 0a 74 68 65 20 73 63 72 | 65 65 6e 20 75 70 64 61 |.the scr|een upda|
|00006290| 74 65 20 74 61 6b 65 73 | 20 61 20 77 68 69 6c 65 |te takes| a while|
|000062a0| 2c 20 61 6e 64 20 61 73 | 20 74 68 65 20 74 69 6d |, and as| the tim|
|000062b0| 65 72 20 69 73 20 64 69 | 73 61 62 6c 65 64 20 66 |er is di|sabled f|
|000062c0| 6f 72 20 74 68 61 74 20 | 74 69 6d 65 0d 0a 69 74 |or that |time..it|
|000062d0| 20 6d 61 79 20 69 6e 74 | 72 6f 64 75 63 65 20 62 | may int|roduce b|
|000062e0| 72 65 61 6b 73 20 69 6e | 20 74 68 65 20 6d 75 73 |reaks in| the mus|
|000062f0| 69 63 2e 20 54 68 65 72 | 65 66 6f 72 65 20 77 65 |ic. Ther|efore we|
|00006300| 20 73 75 67 67 65 73 74 | 20 79 6f 75 20 68 61 6e | suggest| you han|
|00006310| 64 6c 65 20 74 68 65 0d | 0a 74 69 6d 65 72 20 73 |dle the.|.timer s|
|00006320| 63 72 65 65 6e 20 73 79 | 6e 63 68 72 6f 6e 69 7a |creen sy|nchroniz|
|00006330| 61 74 69 6f 6e 20 62 65 | 66 6f 72 65 20 79 6f 75 |ation be|fore you|
|00006340| 20 73 74 61 72 74 20 70 | 6c 61 79 69 6e 67 20 6d | start p|laying m|
|00006350| 75 73 69 63 2e 0d 0a 0d | 0a 0d 0a 5c 73 75 62 73 |usic....|...\subs|
|00006360| 65 63 74 69 6f 6e 7b 54 | 69 6d 65 72 20 73 63 72 |ection{T|imer scr|
|00006370| 65 65 6e 20 73 79 6e 63 | 68 72 6f 6e 69 7a 65 64 |een sync|hronized|
|00006380| 20 72 6f 75 74 69 6e 65 | 73 7d 0d 0a 0d 0a 7b 5c | routine|s}....{\|
|00006390| 65 6d 20 74 6d 72 53 79 | 6e 63 53 63 72 28 29 7d |em tmrSy|ncScr()}|
|000063a0| 20 74 61 6b 65 73 20 61 | 73 20 61 72 67 75 6d 65 | takes a|s argume|
|000063b0| 6e 74 73 20 70 6f 69 6e | 74 65 72 73 20 74 6f 20 |nts poin|ters to |
|000063c0| 74 68 72 65 65 20 73 65 | 70 61 72 61 74 65 20 66 |three se|parate f|
|000063d0| 75 6e 63 74 69 6f 6e 73 | 0d 0a 2d 2d 2d 20 7b 5c |unctions|..--- {\|
|000063e0| 65 6d 20 70 72 65 56 52 | 28 29 7d 2c 20 7b 5c 65 |em preVR|()}, {\e|
|000063f0| 6d 20 69 6d 6d 56 52 28 | 29 7d 20 61 6e 64 20 7b |m immVR(|)} and {|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.